Files
ox_lib/web/src/main.tsx
Luke a1d2607286 chore(web): update react and chakra versions
hopefully nothing broke that I didn't notice prayge
2022-10-27 16:44:47 +02:00

47 lines
1.4 KiB
TypeScript

import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import { VisibilityProvider } from './providers/VisibilityProvider';
import { ChakraProvider } from '@chakra-ui/react';
import { theme } from './theme';
import { debugData } from './utils/debugData';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
import { fab } from '@fortawesome/free-brands-svg-icons';
import { library } from '@fortawesome/fontawesome-svg-core';
import { isEnvBrowser } from './utils/misc';
import LocaleProvider from './providers/LocaleProvider';
library.add(fas, far, fab);
if (isEnvBrowser()) {
const root = document.getElementById('root');
// https://i.imgur.com/iPTAdYV.png - Night time img
root!.style.backgroundImage = 'url("https://i.imgur.com/3pzRj9n.png")';
root!.style.backgroundSize = 'cover';
root!.style.backgroundRepeat = 'no-repeat';
root!.style.backgroundPosition = 'center';
}
debugData([
{
action: 'setVisible',
data: true,
},
]);
const root = document.getElementById('root');
ReactDOM.createRoot(root!).render(
<React.StrictMode>
<LocaleProvider>
<VisibilityProvider>
<ChakraProvider theme={theme}>
<App />
</ChakraProvider>
</VisibilityProvider>
</LocaleProvider>
</React.StrictMode>
);