aboutsummaryrefslogtreecommitdiff
path: root/src/index.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-03-21 14:29:05 +0300
committereug-vs <eug-vs@keemail.me>2020-03-21 14:29:05 +0300
commitf4d8ee37400f25d4fec3638b1ba73e8661c30959 (patch)
tree06d86f70329ec7a5bdca66d360c9081a3458da37 /src/index.tsx
parent550f00b93c03a9ad98ef9bb1197c0fbfd5b1e572 (diff)
downloadchrono-cube-ui-f4d8ee37400f25d4fec3638b1ba73e8661c30959.tar.gz
feat: add types.d.ts, migrate Scoreboard
Diffstat (limited to 'src/index.tsx')
-rw-r--r--src/index.tsx7
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 />),