From b2fe1b816044b8630f570c04c884c8ffcf3e3e61 Mon Sep 17 00:00:00 2001 From: Eug-VS Date: Sat, 11 Jan 2020 17:56:38 +0300 Subject: Improve names, getPageComponent() --> Remove 'Page' word from page-components, since they are all now located in the pages/ folder. --- src/pages/TimerPage/TimerPage.js | 76 ---------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 src/pages/TimerPage/TimerPage.js (limited to 'src/pages/TimerPage/TimerPage.js') diff --git a/src/pages/TimerPage/TimerPage.js b/src/pages/TimerPage/TimerPage.js deleted file mode 100644 index 591eb7b..0000000 --- a/src/pages/TimerPage/TimerPage.js +++ /dev/null @@ -1,76 +0,0 @@ -import React from 'react'; - -import { post } from '../../requests'; - -import Window from "../../components/Window/Window"; -import ContentSection from "../../components/ContentSection/ContentSection"; -import Timer from "./Timer/Timer"; -import SmartList from "../../components/SmartList/SmartList"; -import SolutionCard from "../../components/SolutionCard/SolutionCard"; - -import { Typography, makeStyles } from "@material-ui/core"; - - -const useStyles = makeStyles(theme => ({ - primary: { - padding: theme.spacing(4), - }, - cell: { - padding: theme.spacing(5), - }, -})); - -const TimerPage = ({ recentSolutions, setRecentSolutions }) => { - const classes = useStyles(); - - const user = { - id: null, - username: 'anonymous', - }; - - const registerResult = result => { - const solution = { author_id: user.id, result }; - post('solutions/', solution).then(response => { - setRecentSolutions([response.data].concat(recentSolutions)); - }); - }; - - const removeSolution = (id) => { - setRecentSolutions(recentSolutions.filter((solution => solution.id !== id))); - }; - - const renderItem = ({ index, style }) => { - const solution = recentSolutions[index]; - return ( -
- -
- ); - }; - - return ( - <> - -
- - - Here is some text about how cool this application is, why you should use it - and how to make it better! - - - -
-
- - - - - ); -}; - - -export default TimerPage; -- cgit v1.2.3