Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-07-15 04:07:19 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7796b0fa99911257cc0037acf271e2ad3ce60bd5
7796b0fa
1 parent
926f373d
change main page
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
front/src/Components/App.js
front/src/Components/App.js
View file @
7796b0f
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
>
...
...
Please
register
or
login
to post a comment