Skip to content

Commit

Permalink
fix(webapp): overwrite styles (#840)
Browse files Browse the repository at this point in the history
* fix(webapp): overwrite styles
  • Loading branch information
tetogomez authored Oct 16, 2021
1 parent f144b22 commit 8dfb08b
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 140 deletions.
2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@date-io/date-fns": "^2.11.0",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@eoscostarica/eoscr-components": "^3.5.4",
"@eoscostarica/eoscr-components": "^3.5.6",
"@eoscostarica/ual-reactjs-renderer": "^0.3.1",
"@mui/icons-material": "^5.0.1",
"@mui/lab": "^5.0.0-alpha.48",
Expand Down
27 changes: 17 additions & 10 deletions webapp/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Suspense, useMemo } from 'react'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
import AdapterDateFns from '@mui/lab/AdapterDateFns'
import LocalizationProvider from '@mui/lab/LocalizationProvider'
import { StylesProvider, createGenerateClassName } from '@mui/styles'
import { ThemeProvider } from '@mui/material/styles'
import CssBaseline from '@mui/material/CssBaseline'

Expand All @@ -12,6 +13,10 @@ import { useSharedState } from './context/state.context'
import getTheme from './theme'
import './i18n'

const generateClassName = createGenerateClassName({
productionPrefix: 'eosRate'
})

const App = () => {
const [state] = useSharedState()

Expand All @@ -31,16 +36,18 @@ const App = () => {

return (
<BrowserRouter>
<ThemeProvider theme={theme}>
<CssBaseline />
<LocalizationProvider dateAdapter={AdapterDateFns}>
<DashboardLayout routes={userRoutes.sidebar}>
<Suspense fallback={<Loader />}>
<Switch>{userRoutes.browser.map(renderRoute)}</Switch>
</Suspense>
</DashboardLayout>
</LocalizationProvider>
</ThemeProvider>
<StylesProvider generateClassName={generateClassName}>
<ThemeProvider theme={theme}>
<CssBaseline />
<LocalizationProvider dateAdapter={AdapterDateFns}>
<DashboardLayout routes={userRoutes.sidebar}>
<Suspense fallback={<Loader />}>
<Switch>{userRoutes.browser.map(renderRoute)}</Switch>
</Suspense>
</DashboardLayout>
</LocalizationProvider>
</ThemeProvider>
</StylesProvider>
</BrowserRouter>
)
}
Expand Down
1 change: 1 addition & 0 deletions webapp/src/components/Sidebar/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default theme => ({
listItem: {
display: 'flex',
flexDirection: 'column',
marginTop: '0 !important',
'& p': {
fonWeight: theme.typography.fontWeightBold,
paddingLeft: theme.spacing(2),
Expand Down
Loading

0 comments on commit 8dfb08b

Please sign in to comment.