Skip to content

Commit bf83247

Browse files
committed
Fix next.js bug workaround
1 parent a3481ba commit bf83247

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use client";
2+
3+
export { default as CustomLink } from "next/link";
4+
5+
// Refer - https://github.com/vercel/next.js/issues/85604

examples/nextjs/src/app/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { Core } from "nextjs-darkmode-lite";
44
import { Layout } from "@repo/shared/dist/server";
55
import { GlobalLoader, Header } from "@repo/shared";
66
import { Inter } from "next/font/google";
7-
import Link from "next/link";
87
import { Particles } from "webgl-generative-particles/react";
98
import { ReactNode } from "react";
9+
import { CustomLink } from "./custom-link";
1010

1111
const inter = Inter({ subsets: ["latin"] });
1212

@@ -17,7 +17,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }):
1717
<body className={inter.className}>
1818
<Core />
1919
<Layout>
20-
<Header linkComponent={Link} />
20+
<Header linkComponent={CustomLink} />
2121
{children}
2222
</Layout>
2323
<GlobalLoader />

0 commit comments

Comments
 (0)