Skip to content

Commit

Permalink
add fix for local env
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaraBread committed Feb 18, 2024
1 parent 36ab5e7 commit 35cab4b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/(pages)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ export default function RootLayout({
}: Readonly<{
children: React.ReactNode;
}>) {
let basePath = "/";
if(process.env.NEXT_PUBLIC_BASE_PATH != null) {
basePath = process.env.NEXT_PUBLIC_BASE_PATH.endsWith("/")?process.env.NEXT_PUBLIC_BASE_PATH:"/";
}
return (
<html lang="en">
<body>
<Script src={process.env.NEXT_PUBLIC_BASE_PATH+"js/smoothscroll.min.js"} />
<Script src={basePath+"js/smoothscroll.min.js"} />
<RememberTheme />
<div className={styles.players}>
<Players />
Expand Down

0 comments on commit 35cab4b

Please sign in to comment.