Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Debug pg (#352)

Bill Yang3147507edae1
diff --git a/client/src/app/[site]/layout.tsx b/client/src/app/[site]/layout.tsx
index 5ba0621b4..dad96785a 100644
--- a/client/src/app/[site]/layout.tsx
+++ b/client/src/app/[site]/layout.tsx
@@ -22,7 +22,11 @@ export default function SiteLayout({
useSyncStateWithUrl();
useEffect(() => {
- if (pathname.includes("/") && pathname.split("/")[1] !== site) {
+ if (
+ pathname.includes("/") &&
+ pathname.split("/")[1] !== site &&
+ !isNaN(Number(pathname.split("/")[1]))
+ ) {
setSite(pathname.split("/")[1]);
}
}, [pathname]);