summaryrefslogtreecommitdiff
path: root/src/index.js
blob: ae129ee64daac2b7ed48e9520e6f0166068cc913 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import React from 'react';
import ReactDOM from 'react-dom/client';
import 'dayjs/locale/pt-br'; // carregar sob demanda
import dayjs from 'dayjs';

import { BrowserRouter } from 'react-router-dom';
import { createTheme } from '@mui/material';
import { ThemeProvider } from '@mui/system';

import App from './app/App';
import reportWebVitals from './reportWebVitals';
import AppProviders from './context';

import './index.css';

dayjs.locale('pt-br');

const theme = createTheme({
  palette: {
    primary: {
      main: '#32A041',
      black: '#1C1C1C',
      lightGray: '#8C8C8C',
      mainBackground: '#EEEEEE',
    },
    secondary: {
      main: '#00420C',
    },
  },
  typography: {
    fontFamily: ['Fira Code'].join(','),
  },
});

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <BrowserRouter>
      <ThemeProvider theme={theme}>
        <AppProviders>
          <App />
        </AppProviders>
      </ThemeProvider>
    </BrowserRouter>
  </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();