disable ssr

This commit is contained in:
Aykut Saraç 2022-02-15 16:30:30 +03:00
parent b2d1891d64
commit b03e63726b

View File

@ -7,9 +7,12 @@ import { ThemeProvider } from "styled-components";
import GlobalStyle from "src/constants/globalStyle";
import { darkTheme } from "src/constants/theme";
import { Loading } from "src/components/Loading";
import { useLoading } from "src/hooks/useLoading";
function AykutSarac({ Component, pageProps }: AppProps) {
const router = useRouter();
const data = useLoading();
const [pageLoading, setPageLoading] = React.useState<boolean>(false);
React.useEffect(() => {
const handleStart = () => {
@ -35,6 +38,8 @@ function AykutSarac({ Component, pageProps }: AppProps) {
</ThemeProvider>
);
if (!data) return null;
return (
<ThemeProvider theme={darkTheme}>
<GlobalStyle />