import React, { Component } from "react"; import ReactDOM from 'react-dom/client'; import HomePage from "./HomePage"; import { CssBaseline, IconButton , Link} from "@mui/material"; import { ThemeProvider, createTheme } from '@mui/material/styles'; import UnsafeAlert from "./UnsafeAlert"; import { LearnDialog } from "./Dialogs"; import { I18nextProvider } from "react-i18next"; import i18n from "./i18n"; //Icons import DarkModeIcon from '@mui/icons-material/DarkMode'; import LightModeIcon from '@mui/icons-material/LightMode'; import SchoolIcon from '@mui/icons-material/School'; export default class App extends Component { constructor(props) { super(props); this.state = { dark: false, openLearn: false, } } lightTheme = createTheme({}); darkTheme = createTheme({ palette: { mode: 'dark', background: { default: "#070707" }, }, }); render() { return ( this.setState({openLearn:false})}/> this.setState({openLearn:true})}> this.setState({dark:!this.state.dark})}> {this.state.dark ? :} ); } } const root = ReactDOM.createRoot( document.getElementById("app") ); root.render();