15 lines
350 B
JavaScript
Raw Normal View History

2021-01-09 17:50:45 +08:00
import Link from 'next/link'
2021-01-16 18:07:08 +08:00
import { kebabCase } from '@/lib/utils'
2021-01-09 17:50:45 +08:00
const Tag = ({ text }) => {
return (
<Link href={`/tags/${kebabCase(text)}`}>
2021-01-12 23:35:36 +08:00
<a className="text-sm font-medium text-blue-500 uppercase hover:text-blue-600 dark:hover:text-blue-400">
2021-01-09 17:50:45 +08:00
{text.split(' ').join('-')}
</a>
</Link>
)
}
export default Tag