From f4d8ee37400f25d4fec3638b1ba73e8661c30959 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sat, 21 Mar 2020 14:29:05 +0300
Subject: feat: add types.d.ts, migrate Scoreboard

---
 src/index.tsx | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to 'src/index.tsx')

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 />),
-- 
cgit v1.2.3

