mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-21 20:39:36 +02:00
Added redux. Moved theme loading/setting to redux actions. Added automatic theme loading based on localStorage value.
This commit is contained in:
parent
765418d3d2
commit
7199e296b8
14 changed files with 203 additions and 39 deletions
29
client/src/components/Home/Home.tsx
Normal file
29
client/src/components/Home/Home.tsx
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { Link } from 'react-router-dom';
|
||||
import Icon from '../UI/Icon/Icon';
|
||||
|
||||
import classes from './Home.module.css';
|
||||
import { Container } from '../UI/Layout/Layout';
|
||||
import Headline from '../UI/Headline/Headline';
|
||||
|
||||
const Home = (): JSX.Element => {
|
||||
const dateAndTime = (): string => {
|
||||
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
||||
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
||||
|
||||
const date = new Date();
|
||||
|
||||
|
||||
return `${days[date.getDay()]}, ${date.getDate()} of ${months[date.getMonth()]} ${date.getFullYear()}`;
|
||||
}
|
||||
|
||||
return (
|
||||
<Container>
|
||||
<Headline title='Home' subtitle={dateAndTime()} />
|
||||
<Link to='/settings' className={classes.SettingsButton}>
|
||||
<Icon icon='mdiCog' />
|
||||
</Link>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
export default Home;
|
Loading…
Add table
Add a link
Reference in a new issue