mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01:00
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 });
|
||||
|
||||
export default function Main() {
|
||||
// disable ssr
|
||||
if(typeof window === 'undefined') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const [state, dispatch] = useStore();
|
||||
|
||||
const {
|
||||
@ -72,5 +67,6 @@ export default function Main() {
|
||||
</section>
|
||||
</StyledWrapper>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -6,11 +6,21 @@ import 'react-tabs/style/react-tabs.css';
|
||||
import 'codemirror/lib/codemirror.css';
|
||||
import 'graphiql/graphiql.min.css';
|
||||
|
||||
function SafeHydrate({ children }) {
|
||||
return (
|
||||
<div suppressHydrationWarning>
|
||||
{typeof window === 'undefined' ? null : children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return (
|
||||
<StoreProvider>
|
||||
<Component {...pageProps} />
|
||||
</StoreProvider>
|
||||
<SafeHydrate>
|
||||
<StoreProvider>
|
||||
<Component {...pageProps} />
|
||||
</StoreProvider>
|
||||
</SafeHydrate>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 1rem;
|
||||
color: rgb(62 62 62);
|
||||
color: rgb(48 48 48);
|
||||
|
||||
font-kerning: none;
|
||||
text-rendering: optimizeSpeed;
|
||||
|
Loading…
Reference in New Issue
Block a user