21 lines
553 B
TypeScript
21 lines
553 B
TypeScript
|
|
import React from 'react';
|
||
|
|
import { createRoot } from 'react-dom/client';
|
||
|
|
import { ThemeProvider } from 'styled-components';
|
||
|
|
import { App } from './App';
|
||
|
|
import { GlobalStyle } from './styles/GlobalStyle';
|
||
|
|
import { theme } from './styles/theme';
|
||
|
|
|
||
|
|
const root = document.getElementById('root');
|
||
|
|
|
||
|
|
if (!root) {
|
||
|
|
throw new Error('Root element #root was not found');
|
||
|
|
}
|
||
|
|
|
||
|
|
createRoot(root).render(
|
||
|
|
<React.StrictMode>
|
||
|
|
<ThemeProvider theme={theme}>
|
||
|
|
<GlobalStyle />
|
||
|
|
<App />
|
||
|
|
</ThemeProvider>
|
||
|
|
</React.StrictMode>,
|
||
|
|
);
|