gcds-components
gcds-components copied to clipboard
fix(ssr): render issues
Summary
Fix a render issue on a node that's just a string Found a render issue when I'm using the PhaseBanner inside the Header component
⨯ TypeError: Cannot read properties of null (reading 'useContext')
at resolve (../../gcds-components/packages/react-ssr/dist/esm/lib/client/index.js:43:31)
at resolve (../../gcds-components/packages/react-ssr/dist/esm/lib/client/index.js:28:13)
at resolve (../../gcds-components/packages/react-ssr/dist/esm/lib/client/index.js:43:13)
at eval (../../gcds-components/packages/react-ssr/dist/esm/lib/client/index.js:7:385)
digest: "3024408193"
Also found a render issue if you attempted to add a component that uses forwardRefs like the Link component from NextJS. Didn't find a fix for it, but I added the conditional logic to handle it once we have the fix so it's easier to go back to.