diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-05-04 13:43:48 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-05-04 13:43:48 +0300 |
commit | 29007c89c6cd725f69ff800c720faf89e5aa77ee (patch) | |
tree | 073a70aa684b86681c9d29027ebe9b039928c4f2 /src/index.tsx | |
parent | a0a7d00d30c9a057219c1dd6c7882c2d7fe21ae3 (diff) | |
download | chrono-cube-ui-29007c89c6cd725f69ff800c720faf89e5aa77ee.tar.gz |
feat: add bitter font for headingsfeat/revisit
Diffstat (limited to 'src/index.tsx')
-rw-r--r-- | src/index.tsx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/index.tsx b/src/index.tsx index 9b740f9..30d0f07 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import ReactDOM from 'react-dom'; import './style.css'; +import './fonts/Bitter-Regular.woff'; import Timer from './components/Timer'; @@ -14,13 +15,24 @@ const App: React.FC = () => { const [solutions, setSolutions] = useState<Solution[]>([]); const registerResult = (result: string) => { - setSolutions([...solutions, { author, result }]); + setSolutions([{ author, result }, ...solutions]); } return ( - <Timer registerResult={registerResult} /> + <> + <h2>Timer</h2> + <Timer registerResult={registerResult} /> + + <h2>Results</h2> + <ul> + {solutions.map(solution => ( + <li> + {solution.result} by {solution.author} + </li> + ))} + </ul> + </> ); }; -document.body.style.overflow = 'hidden'; ReactDOM.render(<App />, document.getElementById('root')); |