diff options
author | Eug-VS <eug-vs@keemail.me> | 2020-01-12 18:04:57 +0300 |
---|---|---|
committer | Eug-VS <eug-vs@keemail.me> | 2020-01-12 18:11:45 +0300 |
commit | fff9eae8022e1e3bb88884a47bfd4153b089f444 (patch) | |
tree | a3edf615afdc83d364d58b84065017fae7fb5e98 /src/pages/Timer/Timer.js | |
parent | 0de06228f4b5e482b6f73230210225b332f0a2ff (diff) | |
download | chrono-cube-ui-fff9eae8022e1e3bb88884a47bfd4153b089f444.tar.gz |
Add Profile history, link Profile at Timer page
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> |