diff options
Diffstat (limited to 'src/pages/Timer/Timer.js')
-rw-r--r-- | src/pages/Timer/Timer.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pages/Timer/Timer.js b/src/pages/Timer/Timer.js index 83ec0dc..a41c47b 100644 --- a/src/pages/Timer/Timer.js +++ b/src/pages/Timer/Timer.js @@ -34,6 +34,10 @@ const Timer = ({ user, recentSolutions, setRecentSolutions, setPage }) => { setPage('contribute'); }; + const handleLogin = () => { + setPage('profile'); + }; + const removeSolution = (id) => { setRecentSolutions(recentSolutions.filter((solution => solution.id !== id))); }; @@ -61,6 +65,12 @@ const Timer = ({ user, recentSolutions, setRecentSolutions, setPage }) => { </p> <Button variant="contained" color="secondary" onClick={handleLearnMore}> Learn more </Button> </ContentSection> + {user.id === null && + <ContentSection sectionName="Log into an account"> + <p> Tell us your name so we can track your progress</p> + <Button variant="contained" color="secondary" onClick={handleLogin} size="large"> Login </Button> + </ContentSection> + } <TimerButton registerResult={registerResult} /> </div> </Window> |