fix: hydration error

This commit is contained in:
iCrawl
2022-08-22 14:29:31 +02:00
parent 474eae0afc
commit 9f18036078

View File

@@ -97,7 +97,7 @@ export function SidebarLayout({ packageName, data, children }: PropsWithChildren
</Menu.Item>
));
const asPathWithoutQuery = router.asPath.split('?')[0];
const asPathWithoutQuery = router.asPath.split('?')[0]?.split('#')[0];
const breadcrumbs = asPathWithoutQuery?.split('/').map((path, idx, original) => (
<Link key={idx} href={original.slice(0, idx + 1).join('/')} passHref>
<Anchor component="a">{path}</Anchor>