diff --git a/resources/images/icons/01d.png b/resources/images/icons/01d.png new file mode 100644 index 0000000..74ca38e Binary files /dev/null and b/resources/images/icons/01d.png differ diff --git a/resources/images/icons/01d.svg b/resources/images/icons/01d.svg new file mode 100644 index 0000000..56cdf58 --- /dev/null +++ b/resources/images/icons/01d.svg @@ -0,0 +1,45 @@ + + + + + + diff --git a/resources/images/icons/02d.png b/resources/images/icons/02d.png new file mode 100644 index 0000000..ff52796 Binary files /dev/null and b/resources/images/icons/02d.png differ diff --git a/resources/images/icons/02d.svg b/resources/images/icons/02d.svg new file mode 100644 index 0000000..812edb3 --- /dev/null +++ b/resources/images/icons/02d.svg @@ -0,0 +1,55 @@ + + + + + + + + + diff --git a/resources/images/icons/03d.png b/resources/images/icons/03d.png new file mode 100644 index 0000000..963fbe7 Binary files /dev/null and b/resources/images/icons/03d.png differ diff --git a/resources/images/icons/03d.svg b/resources/images/icons/03d.svg new file mode 100644 index 0000000..354d262 --- /dev/null +++ b/resources/images/icons/03d.svg @@ -0,0 +1,48 @@ + + + + + + + + diff --git a/resources/images/icons/03n.png b/resources/images/icons/03n.png new file mode 100644 index 0000000..963fbe7 Binary files /dev/null and b/resources/images/icons/03n.png differ diff --git a/resources/images/icons/03n.svg b/resources/images/icons/03n.svg new file mode 100644 index 0000000..354d262 --- /dev/null +++ b/resources/images/icons/03n.svg @@ -0,0 +1,48 @@ + + + + + + + + diff --git a/resources/images/icons/04d.png b/resources/images/icons/04d.png new file mode 100644 index 0000000..cab405c Binary files /dev/null and b/resources/images/icons/04d.png differ diff --git a/resources/images/icons/04d.svg b/resources/images/icons/04d.svg new file mode 100644 index 0000000..fcf1c89 --- /dev/null +++ b/resources/images/icons/04d.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + diff --git a/resources/images/icons/09d.png b/resources/images/icons/09d.png new file mode 100644 index 0000000..1a4fb8c Binary files /dev/null and b/resources/images/icons/09d.png differ diff --git a/resources/images/icons/09d.svg b/resources/images/icons/09d.svg new file mode 100644 index 0000000..8b572da --- /dev/null +++ b/resources/images/icons/09d.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/icons/10d.png b/resources/images/icons/10d.png new file mode 100644 index 0000000..220d103 Binary files /dev/null and b/resources/images/icons/10d.png differ diff --git a/resources/images/icons/10d.svg b/resources/images/icons/10d.svg new file mode 100644 index 0000000..c04e441 --- /dev/null +++ b/resources/images/icons/10d.svg @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/images/icons/weather.svg b/resources/images/icons/weather.svg new file mode 100644 index 0000000..e54e563 --- /dev/null +++ b/resources/images/icons/weather.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/js/components/Img.tsx b/resources/js/components/Img.tsx new file mode 100644 index 0000000..2d4a6c4 --- /dev/null +++ b/resources/js/components/Img.tsx @@ -0,0 +1,8 @@ +import React, {FC} from "react"; + +const Img: FC<{src: string, alt: string, width: string}> = ({src, alt, width, ...props}) => { + + return {alt} +} + +export default Img diff --git a/resources/js/customPrototypes.ts b/resources/js/customPrototypes.ts index 907eb4b..f013e05 100644 --- a/resources/js/customPrototypes.ts +++ b/resources/js/customPrototypes.ts @@ -1,4 +1,4 @@ -const weekDays = ['lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche'] +const weekDays = ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'] interface Date { getWeekDay(): string, @@ -10,6 +10,5 @@ Date.prototype.toSQLDate = function (): string { } Date.prototype.getWeekDay = function () { - const dayIndex = this.getDay() === 0 ? 6 : this.getDay() - 1 - return weekDays[dayIndex] + return weekDays[this.getDay()] } diff --git a/resources/js/pages/Weather.tsx b/resources/js/pages/Weather.tsx index 855aa1d..81aaaaf 100644 --- a/resources/js/pages/Weather.tsx +++ b/resources/js/pages/Weather.tsx @@ -1,8 +1,9 @@ import React, {FC, useEffect, useState} from "react" import PageLayout from "../components/PageLayout" -import useAxiosTools from "../hooks/AxiosTools"; -import {WeatherValue} from "../types"; +import useAxiosTools from "../hooks/AxiosTools" +import {WeatherValue} from "../types" import Card from "../components/Card" +import Img from "../components/Img" const Weather = () => { @@ -75,8 +76,10 @@ const Weather = () => {
- {currentWeather && {currentWeather?.weather[0].main}} + {/*{currentWeather && {currentWeather?.weather[0].main}}*/} + {currentWeather && {currentWeather?.weather[0].main}}
{currentWeather?.main.temp_max.toFixed()} °C @@ -146,9 +149,9 @@ const WeatherCard: FC<{date: string, values: WeatherValue[]}> = ({date, values= {weatherState?.description}
- {weatherState?.main + {weatherState?.main