sdy

change main page

import React from "react";
import gql from "graphql-tag";
import { useQuery } from "@apollo/react-hooks";
import { ThemeProvider } from "styled-components";
import GlobalStyles from "../Styles/GlobalStyles";
import Helmet from "./Helmet";
import Theme from "../Styles/Theme";
import Router from "../Routes/Router";
import { BrowserRouter } from "react-router-dom";
const QUERY = gql`
{
isLoggedIn @client
}
`;
import Main from "../Routes/Main/MainPresenter";
export default () => {
const { data } = useQuery(QUERY);
let isLoggedIn;
if (data !== undefined) {
isLoggedIn = data.isLoggedIn;
}
return (
<ThemeProvider theme={Theme}>
<>
<GlobalStyles />
<Helmet />
<BrowserRouter>
<Router isLoggedIn={isLoggedIn} />
<Main />
<h1>good</h1>
</BrowserRouter>
</>
</ThemeProvider>
......