diff options
author | eug-vs <eug-vs@keemail.me> | 2020-03-21 14:29:05 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-03-21 14:29:05 +0300 |
commit | f4d8ee37400f25d4fec3638b1ba73e8661c30959 (patch) | |
tree | 06d86f70329ec7a5bdca66d360c9081a3458da37 /src/index.tsx | |
parent | 550f00b93c03a9ad98ef9bb1197c0fbfd5b1e572 (diff) | |
download | chrono-cube-ui-f4d8ee37400f25d4fec3638b1ba73e8661c30959.tar.gz |
feat: add types.d.ts, migrate Scoreboard
Diffstat (limited to 'src/index.tsx')
-rw-r--r-- | src/index.tsx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/index.tsx b/src/index.tsx index eb43b7e..360ca89 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -5,6 +5,7 @@ import { BenzinThemeProvider, Header, } from 'react-benzin'; +import { User, Solution } from './types'; import 'typeface-roboto'; @@ -20,15 +21,11 @@ import GitHubIcon from '@material-ui/icons/GitHub'; import { get } from './requests'; -interface User { - username: string; - id: number | null; -} const App: React.FC = () => { const [page, setPage] = useState<string>('app'); const [user, setUser] = useState<User>({ username: 'anonymous', id: null }); - const [recentSolutions, setRecentSolutions] = useState([]); + const [recentSolutions, setRecentSolutions] = useState<Solution[]>([]); const headerContents = { app: (<TimerIcon />), |