Put global styles in index

This commit is contained in:
Hazem Krimi
2021-04-13 18:36:35 +01:00
parent 85040d4ee1
commit 6d7b242e46
2 changed files with 7 additions and 9 deletions
+1 -5
View File
@@ -1,16 +1,12 @@
import { Route, Switch } from 'react-router-dom';
import GlobalStyles from './GlobalStyles';
const App = () => {
return (
<>
<GlobalStyles />
<Switch>
<Route path='/' exact>
<div style={{ margin: '2rem', width: '95vw' }}></div>
<div />
</Route>
</Switch>
</>
);
};
+2
View File
@@ -4,6 +4,7 @@ import { ThemeProvider } from 'styled-components';
import { BrowserRouter } from 'react-router-dom';
import { theme } from './themes';
import App from './App';
import GlobalStyles from './GlobalStyles';
import reportWebVitals from './reportWebVitals';
ReactDOM.render(
@@ -11,6 +12,7 @@ ReactDOM.render(
<ThemeProvider theme={theme}>
<BrowserRouter>
<App />
<GlobalStyles />
</BrowserRouter>
</ThemeProvider>
</React.StrictMode>,