-
Notifications
You must be signed in to change notification settings - Fork 0
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
19 changed files
with
107 additions
and
72 deletions.
There are no files selected for viewing
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 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 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 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 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
6 changes: 3 additions & 3 deletions
6
src/components/currentWeatherAbout/CurrentWeatherAbout.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
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 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 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,12 @@ | ||
.footer{ | ||
margin-top: 2em; | ||
position: relative; | ||
z-index: 10; | ||
padding: 1.2em 0; | ||
color: var(--primary-color); | ||
} | ||
.items{ | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} |
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,14 @@ | ||
import React from 'react'; | ||
import s from './Footer.module.scss' | ||
|
||
const Footer = React.memo(() => { | ||
return ( | ||
<footer className={s.footer}> | ||
<div className={'container'}> | ||
Footer | ||
</div> | ||
</footer> | ||
); | ||
}); | ||
|
||
export default Footer; |
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,10 +1,11 @@ | ||
.header{ | ||
position: relative; | ||
z-index: 10; | ||
padding: 2em 0; | ||
padding: 1.2em 0; | ||
color: var(--primary-color); | ||
} | ||
.items{ | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} |
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 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 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 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 |
---|---|---|
|
@@ -36,4 +36,7 @@ | |
transform: translateX(100%); | ||
transition: all .3s; | ||
} | ||
} | ||
.toggleContainer input{ | ||
display: none; | ||
} |
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 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 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,10 +1,7 @@ | ||
.homePage{ | ||
position: relative; | ||
overflow-x: hidden; | ||
} | ||
|
||
.items{ | ||
display: flex; | ||
justify-content: space-between; | ||
flex-wrap: wrap; | ||
row-gap: 2.77em; | ||
row-gap: 1.3em; | ||
} |
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,40 +1,25 @@ | ||
import React, {useEffect} from 'react'; | ||
import React from 'react'; | ||
import s from './HomePage.module.scss' | ||
import {useAppDispatch, useAppSelector} from "../../hooks/hooks"; | ||
import {currentWeatherThunk} from "../../store/thunks/currentWeather.thunk"; | ||
import CurrentWeather from "../../components/currentWeather/CurrentWeather"; | ||
import CurrentWeatherAbout from "../../components/currentWeatherAbout/CurrentWeatherAbout"; | ||
import HourlyForecast from "../../components/HourlyForecast/HourlyForecast"; | ||
import {toast, ToastContainer} from "react-toastify"; | ||
import {ToastContainer} from "react-toastify"; | ||
|
||
const HomePage = () => { | ||
const dispatch: any = useAppDispatch() | ||
const currentWeatherError = useAppSelector(state => state.currentWeather.error) | ||
const hourlyWeatherError = useAppSelector(state => state.hourlyWeather.error) | ||
useEffect(() => { | ||
dispatch(currentWeatherThunk('astana')) | ||
}, []); | ||
|
||
useEffect(() => { | ||
currentWeatherError && toast.error(currentWeatherError) | ||
hourlyWeatherError && toast.error(hourlyWeatherError) | ||
}, [currentWeatherError, hourlyWeatherError]); | ||
const HomePage = React.memo(() => { | ||
console.log('HomePage') | ||
return ( | ||
<> | ||
<div className={s.homePage}> | ||
<ToastContainer position="top-left" autoClose={5000}/> | ||
<main> | ||
<div className={`container ${s.items}`}> | ||
<ToastContainer | ||
position="top-left" | ||
autoClose={5000} | ||
/> | ||
<CurrentWeatherAbout /> | ||
<CurrentWeather /> | ||
{/*<DailyForecast />*/} | ||
<HourlyForecast /> | ||
{/*<DailyForecast />*/} | ||
</div> | ||
</div> | ||
</main> | ||
</> | ||
); | ||
}; | ||
}); | ||
|
||
export default HomePage; |