This commit is contained in:
zmeyer44 2023-10-27 14:55:53 -04:00
parent 4980e4335d
commit eb090df052
2 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,4 @@
"use client";
import Link from "next/link"; import Link from "next/link";
import { import {
RiHome6Fill, RiHome6Fill,
@ -5,26 +6,25 @@ import {
RiQuestionAnswerFill, RiQuestionAnswerFill,
} from "react-icons/ri"; } from "react-icons/ri";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { usePathname } from "next/navigation";
export default function BottomNav() { export default function BottomNav() {
const pathname = usePathname();
const navigationItems = [ const navigationItems = [
{ {
href: "/app", href: "/app",
name: "home", name: "home",
icon: RiHome6Fill, icon: RiHome6Fill,
current: true,
}, },
{ {
href: "", href: "/explore",
name: "explore", name: "explore",
icon: RiCompass3Fill, icon: RiCompass3Fill,
current: false,
}, },
{ {
href: "", href: "",
name: "messages", name: "messages",
icon: RiQuestionAnswerFill, icon: RiQuestionAnswerFill,
current: false,
}, },
]; ];
return ( return (
@ -38,7 +38,7 @@ export default function BottomNav() {
> >
<item.icon <item.icon
className={cn( className={cn(
item.current pathname === item.href
? "text-foreground" ? "text-foreground"
: "text-muted-foreground group-hover:text-foreground", : "text-muted-foreground group-hover:text-foreground",
"h-6 w-6 shrink-0", "h-6 w-6 shrink-0",

View File

@ -78,7 +78,7 @@ export default function Sidebar() {
label: "Explore", label: "Explore",
icon: RiCompassLine, icon: RiCompassLine,
type: "link", type: "link",
active: false, active: true,
}, },
{ {
href: "", href: "",