From f35c1cf5480f7506442ac4c9170c5e0a1a4a8b15 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 4 May 2022 12:52:25 +0300 Subject: feat: remove material UI and useless functionality --- src/index.tsx | 83 +++-------------------------------------------------------- 1 file changed, 3 insertions(+), 80 deletions(-) (limited to 'src/index.tsx') diff --git a/src/index.tsx b/src/index.tsx index 360ca89..2b8d92d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,87 +1,10 @@ -import React, { useState, useEffect } from 'react'; +import React from 'react'; import ReactDOM from 'react-dom'; -import { - BenzinThemeProvider, - Header, -} from 'react-benzin'; -import { User, Solution } from './types'; - -import 'typeface-roboto'; - -import Timer from './pages/Timer/Timer'; -import Scoreboard from './pages/Scoreboard/Scoreboard'; -import Contribute from './pages/Contribute/Contribute'; -import Profile from './pages/Profile/Profile'; - -import TimerIcon from '@material-ui/icons/Timer'; -import AccountCircleIcon from '@material-ui/icons/AccountCircle'; -import AssignmentIcon from '@material-ui/icons/Assignment'; -import GitHubIcon from '@material-ui/icons/GitHub'; - -import { get } from './requests'; - +import Timer from './components/Timer'; const App: React.FC = () => { - const [page, setPage] = useState('app'); - const [user, setUser] = useState({ username: 'anonymous', id: null }); - const [recentSolutions, setRecentSolutions] = useState([]); - - const headerContents = { - app: (), - profile: (), - scoreboard: (), - contribute: (), - }; - - useEffect(() => { - const userId = localStorage.getItem('userId'); - if (userId) { - get('users/').then(response => { - setUser(response.data.filter((user: User) => user.id === +userId)[0]); - }); - } - }, []); - - const Page: React.FC<{ page: string }> = ({ page }) => { - switch (page) { - case 'app': - return ( - - ); - - case 'profile': - return ; - - case 'scoreboard': - return ; - - case 'contribute': - return ; - - default: - return ; - } - }; - - return ( - -
- - - ); + return (); }; document.body.style.overflow = 'hidden'; -- cgit v1.2.3