mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Updated/Migrated the active-class-name example to the App router This PR contains the Following Changes. Pages folder Converted into App Folder. Updated file Structure according to the App Router convention Updated ActiveLink Component as per App router. --------- Co-authored-by: samcx <[email protected]>
18 lines
281 B
TypeScript
18 lines
281 B
TypeScript
"use client";
|
|
|
|
import { usePathname } from "next/navigation";
|
|
import Nav from "../../components/Nav";
|
|
|
|
const SlugPage = () => {
|
|
const pathname = usePathname();
|
|
|
|
return (
|
|
<>
|
|
<Nav />
|
|
<p>Hello, I'm the {pathname} page</p>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default SlugPage;
|