aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index f90c39a..4db99cf 100644
--- a/src/index.js
+++ b/src/index.js
@@ -16,6 +16,7 @@ import Profile from "./pages/Profile/Profile";
const App = () => {
const [page, setPage] = useState('app');
+ const [user, setUser] = useState({ username: 'anonymous', id: null });
const [recentSolutions, setRecentSolutions] = useState([]);
const Page = ({ page }) => {
@@ -23,6 +24,7 @@ const App = () => {
case 'app':
return (
<Timer
+ user={user}
recentSolutions={recentSolutions}
setRecentSolutions={setRecentSolutions}
setPage={setPage}
@@ -30,7 +32,7 @@ const App = () => {
);
case 'profile':
- return <Profile/>;
+ return <Profile user={user} setUser={setUser} />;
case 'scoreboard':
return <Scoreboard />;