fix white flash on load

chakra ui defines background white, maybe there is a cleaner way to override
This commit is contained in:
cv
2021-04-23 14:20:58 +02:00
parent b846340ccb
commit e4823c91d6
5 changed files with 17 additions and 55 deletions
-1
View File
@@ -6,6 +6,5 @@
.App {
margin: 0px auto;
overflow: hidden;
background-color: rgba(0, 0, 0, 0);
height: 100vh;
}
+11 -4
View File
@@ -5,14 +5,21 @@ import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter } from 'react-router-dom';
// 1. import `ChakraProvider` component
import { ChakraProvider, CSSReset } from '@chakra-ui/react';
// 1. import Chakra components
import { ChakraProvider, extendTheme } from '@chakra-ui/react';
// 2. Extend the theme to include custom colors, fonts, etc
const colors = {
// not yet
};
const theme = extendTheme({ colors });
ReactDOM.render(
<React.StrictMode>
<ChakraProvider>
<ChakraProvider resetCSS theme={theme}>
<BrowserRouter>
<CSSReset />
<App />
</BrowserRouter>
</ChakraProvider>