@@ -2,9 +2,11 @@ import Link from "next/link";
22import Image from "next/image" ;
33import { usePathname } from "next/navigation" ;
44import { cn } from "@/lib/utils/utils" ;
5+ import { resolveAssetPath } from "@/lib/utils/asset-path" ;
56import { useMediaQuery } from "usehooks-ts" ;
67import { useTheme } from "next-themes" ;
78import { useEffect , useState } from "react" ;
9+ import { useRouter } from "next/router" ;
810
911const socialLinks = [
1012 {
@@ -36,6 +38,7 @@ const socialLinks = [
3638export function BottomNavbar ( ) {
3739 const isMobile = useMediaQuery ( "(max-width: 768px)" ) ;
3840 const pathname = usePathname ( ) ;
41+ const router = useRouter ( ) ;
3942 const { theme, systemTheme } = useTheme ( ) ;
4043 const [ mounted , setMounted ] = useState ( false ) ;
4144
@@ -47,7 +50,7 @@ export function BottomNavbar() {
4750 < div className = "mx-auto max-w-7xl px-4 sm:px-6 lg:px-8" >
4851 < div className = "flex justify-center space-x-6 py-4" >
4952 { socialLinks . map ( ( { href, label, iconLight, iconDark } ) => {
50- let iconSrc = "/logo/default.svg" ;
53+ let iconSrc = iconLight ;
5154
5255 if ( mounted ) {
5356 const currentTheme = theme === "system" ? systemTheme : theme ;
@@ -63,7 +66,7 @@ export function BottomNavbar() {
6366 className = "flex h-8 w-8 items-center justify-center transition-colors hover:text-primary"
6467 aria-label = { label }
6568 >
66- < Image src = { iconSrc } alt = { label } width = { 24 } height = { 24 } className = "h-6 w-6 object-contain" />
69+ < Image src = { resolveAssetPath ( iconSrc , router . basePath ) } alt = { label } width = { 24 } height = { 24 } className = "h-6 w-6 object-contain" />
6770 </ Link >
6871 ) ;
6972 } ) }
0 commit comments