-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
396 additions
and
592 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
import React from 'react'; | ||
import { BrowserRouter as Router } from 'react-router-dom'; | ||
import { Toaster } from 'react-hot-toast'; | ||
import CssBaseline from '@mui/material/CssBaseline'; | ||
import { ThemeProvider } from '@mui/material/styles'; | ||
import { Layout } from 'components/common/Layout/Layout'; | ||
import Content from './components/common/Content/Content'; | ||
import Footer from './components/common/Footer/Footer'; | ||
import Header from './components/common/Header/Header'; | ||
import './App.scss'; | ||
import { Footer } from './components/common/Footer/Footer'; | ||
import { Header } from './components/common/Header/Header'; | ||
import theme from './common/styles/theme'; | ||
|
||
function App() { | ||
return ( | ||
<> | ||
<div className="App"> | ||
<Router> | ||
<Header /> | ||
<Content /> | ||
<Footer /> | ||
<Toaster | ||
toastOptions={{ | ||
// TODO: let's deside on the approach we use: either the inline styles or className? | ||
className: '', | ||
style: { | ||
borderRadius: '10px', | ||
background: '#030321', | ||
color: '#fff', | ||
}, | ||
}} | ||
/> | ||
</Router> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
export default App; | ||
export const App = () => ( | ||
<ThemeProvider theme={theme}> | ||
<Router> | ||
<Layout> | ||
<Header /> | ||
<Content /> | ||
<Footer /> | ||
<Toaster | ||
toastOptions={{ | ||
className: '', | ||
style: { | ||
borderRadius: '10px', | ||
background: '#030321', | ||
color: '#fff', | ||
}, | ||
}} | ||
/> | ||
<CssBaseline /> | ||
</Layout> | ||
</Router> | ||
</ThemeProvider> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export const USER_SESSION_KEY = 'userInSession'; | ||
// TODO: do we nned to think about localizations? | ||
export const TECHNICAL_ERROR = 'Sorry, Voting App has encountered a technical issue, please try again later.'; | ||
export const USER_LOCAL_STORAGE_KEY = 'USER_LOCAL_STORAGE_KEY'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
ui/cip-1694/src/components/CountDownTimer/CountDownTimer.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.container { | ||
color: #1d439b; | ||
text-align: right; | ||
font-size: 18px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 22px; | ||
text-align: left; | ||
} |
14 changes: 3 additions & 11 deletions
14
ui/cip-1694/src/components/CountDownTimer/CountDownTimer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
import React from 'react'; | ||
import moment from 'moment'; | ||
import { useTimer } from 'react-timer-hook'; | ||
import styles from './CountDownTimer.module.scss' | ||
|
||
export default function CountDownTimer() { | ||
const time = new Date(); | ||
const endTime = moment('09-01-2023', 'MM-DD-YYYY'); // summit date | ||
time.setSeconds(time.getSeconds() + endTime.diff(time, 'seconds')); // time left for summit date | ||
const endTime = moment('09-01-2023', 'MM-DD-YYYY').format('D MMMM YYYY, h:mm a'); // summit date | ||
|
||
const { seconds, minutes, hours, days } = useTimer({ expiryTimestamp: time }); | ||
|
||
return ( | ||
<div data-testid="count-down-timer"> | ||
<span>{days} days</span>, <span>{hours} hours</span>, <span>{minutes} minutes</span>, <span>{seconds} secs</span> | ||
</div> | ||
); | ||
return <div className={styles.container} data-testid="count-down-timer">Voting closes: <b>{endTime}</b></div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.