network-resurrector-frontend/src/components/App.js

42 lines
1001 B
JavaScript
Raw Normal View History

2020-12-19 03:38:04 +02:00
import React, { useReducer } from "react";
import ApplicationStepper from "./layout/stepper/ApplicationStepper";
import Switcher from "./layout/Switcher";
2020-12-19 02:08:36 +02:00
import { makeStyles } from "@material-ui/core/styles";
2020-12-19 03:38:04 +02:00
import { initialState } from "../state/initialState";
import { reducer } from "../state/reducer";
2020-12-19 02:08:36 +02:00
2020-12-19 02:14:09 +02:00
const useStyles = makeStyles(() => ({
2020-12-19 02:08:36 +02:00
app: {
textAlign: "center",
backgroundColor: "#282c34",
minHeight: "100vh",
display: "flex",
flexDirection: "column"
},
content: {
minHeight: "80vh",
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
fontSize: "calc(10px + 2vmin)",
color: "white"
}
}));
2020-12-16 03:09:24 +02:00
2020-12-19 03:38:04 +02:00
const App = () => {
2020-12-19 02:08:36 +02:00
const classes = useStyles();
2020-12-19 03:38:04 +02:00
const [state, dispatch] = useReducer(reducer, initialState);
2020-12-19 02:08:36 +02:00
2020-12-16 03:09:24 +02:00
return (
2020-12-19 02:08:36 +02:00
<div className={classes.app}>
2020-12-19 01:28:53 +02:00
<ApplicationStepper />
2020-12-19 02:09:35 +02:00
<div className={classes.content}>
2020-12-16 03:14:50 +02:00
<Switcher />
2020-12-19 02:09:35 +02:00
</div>
2020-12-19 02:08:36 +02:00
</div>
2020-12-16 03:09:24 +02:00
);
};
2020-12-19 03:38:04 +02:00
export default App;