mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
feat/fix/chore: refactor project structure + add favicon
- Changement de structure de fichier - Ajout des favicons des sites - Suppression et mise à jour de dépendances - Ajout React-Icons pour gérer les icons - Amélioration du l'UI
This commit is contained in:
19
components/SideMenu/Favorites/FavoriteItem.tsx
Normal file
19
components/SideMenu/Favorites/FavoriteItem.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import LinkTag from "next/link";
|
||||
|
||||
import { Link } from "../../../types";
|
||||
import LinkFavicon from "../../Links/LinkFavicon";
|
||||
|
||||
import styles from "./favorites.module.scss";
|
||||
|
||||
export default function FavoriteItem({ link }: { link: Link }): JSX.Element {
|
||||
const { name, url, category } = link;
|
||||
return (
|
||||
<li className={styles["item"]}>
|
||||
<LinkTag href={url} target={"_blank"} rel={"noreferrer"}>
|
||||
<LinkFavicon url={url} size={24} />
|
||||
<span>{name}</span>
|
||||
<span className={styles["category"]}> - {category.name}</span>
|
||||
</LinkTag>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user