alexis-opolka / alexis-opolka.github.io

The new website for this account. Will mainly be used as a web portfolio but it will surely grow as time passes.
https://alexis-opolka.dev/
Apache License 2.0
0 stars 0 forks source link

Bug: Github Primer Theming system seems to not take into account the theme #9

Closed alexis-opolka closed 1 year ago

alexis-opolka commented 1 year ago

Github Primer Theming system seems to not take into account the modification of the theme.

See #3573 for more details

This issue is about the version on the theme-system-github-primer branch.

alexis-opolka commented 1 year ago

0b23b79174016821a346e45d3b383143ccb6c6d3 should fix this issue.

The issue was the use of the _app.tsx file while NextJS now uses layout.tsx instead. It came with the the problem of Server Side Rendering (SSR) but a workaround is to set the use client directive at the top of layout.tsx and page.tsx to disable SSR for the current page and send it to the client for rendering.

alexis-opolka commented 1 year ago

It also came with an SSR Source mismatch issue which was resolved using the SSRProvider from @primer/react and a custom component called NoSSR that prevents SSR source to be created for its children.