🚧 wip: share genre tags UI for reuse
This commit is contained in:
25
shared/components/GenreTags.tsx
Normal file
25
shared/components/GenreTags.tsx
Normal file
@ -0,0 +1,25 @@
|
||||
import Link from "next/link";
|
||||
import { Badge } from "../libs/shadcn/ui/badge";
|
||||
|
||||
type GenreTagsProps = {
|
||||
genres: {
|
||||
slug: string;
|
||||
name: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
const GenreTags = ({ genres }: GenreTagsProps) => {
|
||||
return (
|
||||
<div className="flex gap-1.5">
|
||||
{genres.map((genre, index) => (
|
||||
<Link href={`/genres/${genre.slug}`} key={index}>
|
||||
<Badge className="bg-neutral-100/60 backdrop-blur-lg text-neutral-800">
|
||||
{genre.name}
|
||||
</Badge>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default GenreTags;
|
||||
Reference in New Issue
Block a user