forked from extern/bruno
chore: disable nextjs ssr
This commit is contained in:
parent
1b95cda707
commit
f9e7d1463b
@ -33,11 +33,6 @@ import 'codemirror/addon/hint/show-hint.css';
|
|||||||
const RequestTabPanel = dynamic(import('@grafnode/components').then(mod => mod.RequestTabPanel), { ssr: false });
|
const RequestTabPanel = dynamic(import('@grafnode/components').then(mod => mod.RequestTabPanel), { ssr: false });
|
||||||
|
|
||||||
export default function Main() {
|
export default function Main() {
|
||||||
// disable ssr
|
|
||||||
if(typeof window === 'undefined') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const [state, dispatch] = useStore();
|
const [state, dispatch] = useStore();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -72,5 +67,6 @@ export default function Main() {
|
|||||||
</section>
|
</section>
|
||||||
</StyledWrapper>
|
</StyledWrapper>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
@ -6,11 +6,21 @@ import 'react-tabs/style/react-tabs.css';
|
|||||||
import 'codemirror/lib/codemirror.css';
|
import 'codemirror/lib/codemirror.css';
|
||||||
import 'graphiql/graphiql.min.css';
|
import 'graphiql/graphiql.min.css';
|
||||||
|
|
||||||
|
function SafeHydrate({ children }) {
|
||||||
|
return (
|
||||||
|
<div suppressHydrationWarning>
|
||||||
|
{typeof window === 'undefined' ? null : children}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }) {
|
function MyApp({ Component, pageProps }) {
|
||||||
return (
|
return (
|
||||||
<StoreProvider>
|
<SafeHydrate>
|
||||||
<Component {...pageProps} />
|
<StoreProvider>
|
||||||
</StoreProvider>
|
<Component {...pageProps} />
|
||||||
|
</StoreProvider>
|
||||||
|
</SafeHydrate>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ html, body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
color: rgb(62 62 62);
|
color: rgb(48 48 48);
|
||||||
|
|
||||||
font-kerning: none;
|
font-kerning: none;
|
||||||
text-rendering: optimizeSpeed;
|
text-rendering: optimizeSpeed;
|
||||||
|
Loading…
Reference in New Issue
Block a user