Add blog page
This commit is contained in:
16
components/TabItem.tsx
Normal file
16
components/TabItem.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
"use client";
|
||||
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
export default async function TabItem({ targetPath, text }: { targetPath: string, text: string}) {
|
||||
const currentPath = usePathname();
|
||||
|
||||
return (
|
||||
<a
|
||||
href={targetPath}
|
||||
className={currentPath === targetPath ? "underline" : ""}
|
||||
>
|
||||
{text}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user