Skip to content

Commit

Permalink
site fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gilgardosh committed Nov 22, 2022
1 parent 3f43181 commit d7b8e4b
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions website/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,29 @@ export default defineConfig({
</div>
</>
),
main: {
extraContent() {
const { resolvedTheme } = useTheme();
const { route } = useRouter();
main({ children }) {
const { resolvedTheme } = useTheme();
const { route } = useRouter();

if (route === '/') {
return null;
}
return (
<Giscus
// ensure giscus is reloaded when client side route is changed
key={route}
repo="Urigo/graphql-mesh"
repoId="MDEwOlJlcG9zaXRvcnkyMzM1OTc1MTc="
category="Docs Discussions"
categoryId="DIC_kwDODexqTc4CSDDQ"
mapping="pathname"
theme={resolvedTheme}
/>
);
},
const comments = route !== '/' && (
<Giscus
// ensure giscus is reloaded when client side route is changed
key={route}
repo="Urigo/graphql-mesh"
repoId="MDEwOlJlcG9zaXRvcnkyMzM1OTc1MTc="
category="Docs Discussions"
categoryId="DIC_kwDODexqTc4CSDDQ"
mapping="pathname"
theme={resolvedTheme}
/>
);

return (
<>
{children}
{comments}
</>
);
},
siteName: SITE_NAME,
titleSuffix: ` – ${SITE_NAME}`,
});

0 comments on commit d7b8e4b

Please sign in to comment.