8c450790c3
For that the Question.tsx component was refactored to be reusable for categories.
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import CustomAppBar from "./CustomAppBar";
|
|
import {Container} from "@material-ui/core";
|
|
import React from "react";
|
|
import {makeStyles} from "@material-ui/core/styles";
|
|
import {Copyright} from "./Copyright";
|
|
import QuestionList from "./QuestionList";
|
|
import CategoryList from "./CategoryList";
|
|
|
|
const useStyles = makeStyles((theme) => ({
|
|
appBarSpacer: theme.mixins.toolbar,
|
|
content: {
|
|
flexGrow: 1,
|
|
height: '100vh',
|
|
overflow: 'auto',
|
|
},
|
|
container: {
|
|
paddingTop: theme.spacing(4),
|
|
paddingBottom: theme.spacing(4),
|
|
flexDirection: 'column',
|
|
},
|
|
paper: {
|
|
margin: 5,
|
|
padding: theme.spacing(2),
|
|
display: 'flex',
|
|
overflow: 'auto',
|
|
flexDirection: 'column',
|
|
},
|
|
}));
|
|
|
|
function Main() {
|
|
const classes = useStyles();
|
|
return (
|
|
<div>
|
|
<CustomAppBar/>
|
|
<main className={classes.content}>
|
|
<div className={classes.appBarSpacer}/>
|
|
<Container maxWidth="lg" className={classes.container}>
|
|
<QuestionList/>
|
|
<CategoryList/>
|
|
<Copyright/>
|
|
</Container>
|
|
</main>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Main;
|