code cleanup

This commit is contained in:
madarsbiss 2021-07-20 20:42:11 +03:00
parent c8245d56ec
commit 859bfadc9f
2 changed files with 17 additions and 6 deletions

View File

@ -65,12 +65,11 @@ export default function Home() {
/>
<h1 className={styles.mainTemp}>
{Math.round(weatherData.main.temp)}°C
{Math.round(weatherData.main.temp)}°
</h1>
<p>Feels like {Math.round(weatherData.main.feels_like)}°C</p>
<p>Feels like {Math.round(weatherData.main.feels_like)}°</p>
<p>
Time:{" "}
{new Date(
weatherData.dt * 1000 + weatherData.timezone * 1000
).toLocaleString("en-US")}
@ -175,7 +174,14 @@ export default function Home() {
width="100px"
/>
<div>
<h1>4:31</h1>
<h1>
{" "}
{new Date(weatherData.sys.sunrise * 1000).getHours()}:
{(new Date(weatherData.sys.sunrise * 1000).getMinutes() < 10
? "0"
: "") +
new Date(weatherData.sys.sunrise * 1000).getMinutes()}
</h1>
<p>AM</p>
</div>
</div>
@ -203,7 +209,13 @@ export default function Home() {
width="100px"
/>
<div>
<h1>10:02</h1>
<h1>
{new Date(weatherData.sys.sunset * 1000).getHours()}:
{(new Date(weatherData.sys.sunset * 1000).getMinutes() < 10
? "0"
: "") +
new Date(weatherData.sys.sunset * 1000).getMinutes()}
</h1>
<p>PM</p>
</div>
</div>

View File

@ -15,7 +15,6 @@ body {
rgba(137, 171, 245, 0.37) 0%,
rgba(245, 247, 252, 1) 100.2%
);
/* background-image: linear-gradient( 112.1deg, rgba(32,38,57,1) 11.4%, rgba(63,76,119,1) 70.2% ); */
font-family: "Varela Round", sans-serif;
min-height: 100vh;
}