index.jsx 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // @flow
  2. // Copyright 2017 The go-ethereum Authors
  3. // This file is part of the go-ethereum library.
  4. //
  5. // The go-ethereum library is free software: you can redistribute it and/or modify
  6. // it under the terms of the GNU Lesser General Public License as published by
  7. // the Free Software Foundation, either version 3 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // The go-ethereum library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
  17. import React from 'react';
  18. import {render} from 'react-dom';
  19. import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider';
  20. import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
  21. import Dashboard from './components/Dashboard';
  22. const theme: Object = createMuiTheme({
  23. // typography: {
  24. // useNextVariants: true,
  25. // },
  26. palette: {
  27. type: 'dark',
  28. },
  29. });
  30. const dashboard = document.getElementById('dashboard');
  31. if (dashboard) {
  32. // Renders the whole dashboard.
  33. render(
  34. <MuiThemeProvider theme={theme}>
  35. <Dashboard />
  36. </MuiThemeProvider>,
  37. dashboard,
  38. );
  39. }