aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
authorEug-VS <eug-vs@keemail.me>2020-01-06 21:10:48 +0300
committerEug-VS <eug-vs@keemail.me>2020-01-06 21:10:48 +0300
commitb3e2b3f59424da7a61e1b09595d1f1e447c3a31a (patch)
tree68178acc04acd9d7ebcc6d727c9712669d121539 /src/index.js
parentcd76594392b038c49d437f374db3a3665cbbf92f (diff)
downloadchrono-cube-ui-b3e2b3f59424da7a61e1b09595d1f1e447c3a31a.tar.gz
Create initial TimerPage component
Show last 5 results
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js
index 5268b1e..07c50bc 100644
--- a/src/index.js
+++ b/src/index.js
@@ -7,7 +7,7 @@ import { ThemeProvider, makeStyles } from '@material-ui/core/styles';
import theme from "./theme";
import Header from './components/Header/Header';
-import Timer from './components/Timer/Timer';
+import TimerPage from "./components/TimerPage/TimerPage";
import Scoreboard from "./components/Scoreboard/Scoreboard";
@@ -21,13 +21,19 @@ const useStyles = makeStyles(theme => ({
const App = () => {
const [page, setPage] = useState('app');
+ const [recentSolutions, setRecentSolutions] = useState([]);
const classes = useStyles();
const getPageComponent = page => {
switch (page) {
case 'app':
- return (<Timer/>);
+ return (
+ <TimerPage
+ recentSolutions={recentSolutions}
+ setRecentSolutions={setRecentSolutions}
+ />
+ );
case 'scoreboard':
return (<Scoreboard/>);
default: