mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-21 20:39:36 +02:00
Created WeatherWidget
This commit is contained in:
parent
38f5d3b66a
commit
e170f56a03
11 changed files with 462 additions and 57 deletions
|
@ -5,7 +5,6 @@ import { GlobalState } from '../../interfaces/GlobalState';
|
|||
import { getApps } from '../../store/actions';
|
||||
|
||||
import Icon from '../UI/Icons/Icon/Icon';
|
||||
import WeatherIcon from '../UI/Icons/WeatherIcon/WeatherIcon';
|
||||
|
||||
import classes from './Home.module.css';
|
||||
import { Container } from '../UI/Layout/Layout';
|
||||
|
@ -13,6 +12,7 @@ import SectionHeadline from '../UI/Headlines/SectionHeadline/SectionHeadline';
|
|||
import AppGrid from '../Apps/AppGrid/AppGrid';
|
||||
import { App } from '../../interfaces';
|
||||
import Spinner from '../UI/Spinner/Spinner';
|
||||
import WeatherWidget from '../Widgets/WeatherWidget/WeatherWidget';
|
||||
|
||||
interface ComponentProps {
|
||||
getApps: Function;
|
||||
|
@ -63,19 +63,11 @@ const Home = (props: ComponentProps): JSX.Element => {
|
|||
<p>{dateAndTime()}</p>
|
||||
<span className={classes.HeaderMain}>
|
||||
<h1>{greeter()}</h1>
|
||||
<div className={classes.WeatherWidget}>
|
||||
<div className={classes.WeatherIcon}>
|
||||
<WeatherIcon icon='clear-day' />
|
||||
</div>
|
||||
<div className={classes.WeatherDetails}>
|
||||
<span>30°C</span>
|
||||
<span>15°C</span>
|
||||
</div>
|
||||
</div>
|
||||
<WeatherWidget />
|
||||
</span>
|
||||
</header>
|
||||
|
||||
<SectionHeadline title='Apps' link='/apps' />
|
||||
|
||||
<SectionHeadline title='Applications' link='/applications' />
|
||||
{props.loading
|
||||
? <Spinner />
|
||||
: <AppGrid apps={props.apps.filter((app: App) => app.isPinned)} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue