From a28d2a16f95f9f04755964ecace03dfa89645b56 Mon Sep 17 00:00:00 2001 From: MH4GF Date: Sun, 22 Dec 2024 15:44:31 +0900 Subject: [PATCH] feat: add "About me" link to Command component for non-homepage navigation --- app/_features/command/Command.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/_features/command/Command.tsx b/app/_features/command/Command.tsx index 1bb5a0b7..7b9bf4ee 100644 --- a/app/_features/command/Command.tsx +++ b/app/_features/command/Command.tsx @@ -8,7 +8,8 @@ import { CommandList, CommandSeparator, } from "@/app/_components/ui/command"; -import { PenLine } from "lucide-react"; +import { PenLine, UserRound } from "lucide-react"; +import { usePathname } from "next/navigation"; import { useEffect, useState } from "react"; import { CommandFooter } from "./CommandFooter"; import { CommandProvider } from "./CommandProvider"; @@ -18,6 +19,7 @@ import { ShareToX } from "./items/ShareToX"; export function Command() { const [open, setOpen] = useState(false); + const pathname = usePathname(); useEffect(() => { const down = (e: KeyboardEvent) => { @@ -43,6 +45,12 @@ export function Command() { + {pathname !== "/" && ( + + + About me + + )} All Writing