mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-15 11:56:23 +00:00
96c6358d4e
* Implement react i18n-next * Add XHR i18n backend, include currencies_dict in APP * Implement i18n 2/9. Add site description * Implement i18n 3/9 TradeBox. Fix explicit pricing when amount range is enabled. * Implement i18n 4/9 MakerPage. * Implement i18n 5/9 OrderPage * Implement i18n 6/9 Chat * Implement i18n 9/9 Book, Bottom Bar, Profile, Misc, Info * Add Contributing translation guidelines
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
import React, { Component } from "react";
|
|
import { render } from "react-dom";
|
|
import HomePage from "./HomePage";
|
|
import { CssBaseline, IconButton} from "@mui/material";
|
|
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
|
import UnsafeAlert from "./UnsafeAlert";
|
|
|
|
import { I18nextProvider } from "react-i18next";
|
|
import i18n from "./i18n";
|
|
|
|
import DarkModeIcon from '@mui/icons-material/DarkMode';
|
|
import LightModeIcon from '@mui/icons-material/LightMode';
|
|
|
|
export default class App extends Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.state = {
|
|
dark: false,
|
|
}
|
|
}
|
|
|
|
lightTheme = createTheme({});
|
|
|
|
darkTheme = createTheme({
|
|
palette: {
|
|
mode: 'dark',
|
|
background: {
|
|
default: "#070707"
|
|
},
|
|
},
|
|
});
|
|
|
|
render() {
|
|
return (
|
|
<I18nextProvider i18n={i18n}>
|
|
<ThemeProvider theme={this.state.dark ? this.darkTheme : this.lightTheme}>
|
|
<CssBaseline/>
|
|
<IconButton sx={{position:'fixed',right:'0px'}} onClick={()=>this.setState({dark:!this.state.dark})}>
|
|
{this.state.dark ? <LightModeIcon/>:<DarkModeIcon/>}
|
|
</IconButton>
|
|
<UnsafeAlert className="unsafeAlert"/>
|
|
<HomePage/>
|
|
</ThemeProvider>
|
|
</I18nextProvider>
|
|
);
|
|
}
|
|
}
|
|
|
|
const appDiv = document.getElementById("app");
|
|
render(<App />, appDiv); |