refactor: AppContext and App entrypoints
This commit is contained in:
parent
442e7cd8d9
commit
dd0abc8a8b
7 changed files with 32 additions and 10 deletions
|
|
@ -9,13 +9,14 @@ import {
|
|||
} from '@material-ui/core/styles'
|
||||
import { create } from 'jss'
|
||||
import extendJss from 'jss-plugin-extend'
|
||||
import React, { createContext, useContext, useState } from 'react'
|
||||
import React, { useContext, useState } from 'react'
|
||||
import {
|
||||
useLocation,
|
||||
useHistory,
|
||||
BrowserRouter as Router
|
||||
} from 'react-router-dom'
|
||||
|
||||
import AppContext from 'src/AppContext'
|
||||
import Sidebar from 'src/components/layout/Sidebar'
|
||||
import TitleSection from 'src/components/layout/TitleSection'
|
||||
import ApolloProvider from 'src/utils/apollo'
|
||||
|
|
@ -69,8 +70,6 @@ const useStyles = makeStyles({
|
|||
}
|
||||
})
|
||||
|
||||
const AppContext = createContext()
|
||||
|
||||
const Main = () => {
|
||||
const classes = useStyles()
|
||||
const location = useLocation()
|
||||
|
|
@ -148,4 +147,3 @@ const App = () => {
|
|||
}
|
||||
|
||||
export default App
|
||||
export { AppContext }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue