fix: restore individual tag route

This commit is contained in:
Timothy Lin
2023-07-09 17:27:47 +08:00
parent a3085fbc06
commit fab1ead77b
3 changed files with 36 additions and 7 deletions

View File

@ -1,6 +1,5 @@
import Link from 'next/link'
import { kebabCase } from 'pliny/utils/kebabCase'
import { slug } from 'github-slugger'
interface Props {
text: string
}
@ -8,7 +7,7 @@ interface Props {
const Tag = ({ text }: Props) => {
return (
<Link
href={`/tags/${kebabCase(text)}`}
href={`/tags/${slug(text)}`}
className="mr-3 text-sm font-medium uppercase text-primary-500 hover:text-primary-600 dark:hover:text-primary-400"
>
{text.split(' ').join('-')}