diff --git a/next.config.js b/next.config.js index bd3e1d9..0ecf6c9 100644 --- a/next.config.js +++ b/next.config.js @@ -6,7 +6,7 @@ const config = { webpack(config) { config.module.rules.push({ test: /\.svg$/, - use: ["@svgr/webpack"] + use: ["@svgr/webpack"], }); return config; @@ -15,12 +15,12 @@ const config = { remotePatterns: [ { hostname: "localhost" }, { hostname: "t3.gstatic.com" }, - { hostname: "lh3.googleusercontent.com" } + { hostname: "lh3.googleusercontent.com" }, ], - formats: ["image/webp"] + formats: ["image/webp"], }, reactStrictMode: false, - output: "standalone" + output: "standalone", }; module.exports = config; diff --git a/src/components/Links/LinkFavicon.tsx b/src/components/Links/LinkFavicon.tsx index 5c4765f..f1f8fa6 100644 --- a/src/components/Links/LinkFavicon.tsx +++ b/src/components/Links/LinkFavicon.tsx @@ -18,7 +18,7 @@ interface LinkFaviconProps { export default function LinkFavicon({ url, size = 32, - noMargin = false + noMargin = false, }: LinkFaviconProps) { const [isFailed, setFailed] = useState(false); const [isLoading, setLoading] = useState(true); diff --git a/src/components/Links/LinkItem.tsx b/src/components/Links/LinkItem.tsx index cfb6dd0..0f4f9ac 100644 --- a/src/components/Links/LinkItem.tsx +++ b/src/components/Links/LinkItem.tsx @@ -13,7 +13,7 @@ import { makeRequest } from "lib/request"; export default function LinkItem({ link, toggleFavorite, - index + index, }: { link: Link; toggleFavorite: (linkId: Link["id"]) => void; @@ -28,8 +28,8 @@ export default function LinkItem({ name, url, favorite: !favorite, - categoryId: link.category.id - } + categoryId: link.category.id, + }, }) .then(() => toggleFavorite(link.id)) .catch(console.error); @@ -45,7 +45,7 @@ export default function LinkItem({ type: "spring", stiffness: 260, damping: 20, - delay: index * 0.05 + delay: index * 0.05, }} > diff --git a/src/components/Navbar/Navbar.tsx b/src/components/Navbar/Navbar.tsx index 1a960eb..e47b076 100644 --- a/src/components/Navbar/Navbar.tsx +++ b/src/components/Navbar/Navbar.tsx @@ -3,11 +3,16 @@ import { useSession } from "next-auth/react"; import PATHS from "constants/paths"; import styles from "./navbar.module.scss"; import { useTranslation } from "next-i18next"; +import Image from "next/image"; +import { TFunctionParam } from "../../types/i18next"; export default function Navbar() { - const { status } = useSession(); + const { data, status } = useSession(); const { t } = useTranslation(); + const avatarLabel = t("common:avatar", { + name: data?.user?.name, + } as TFunctionParam); return (