err scr ui update

This commit is contained in:
madarsbiss 2021-07-27 17:11:29 +03:00
parent 924566489c
commit 0f6dce766b
2 changed files with 7 additions and 4 deletions

View File

@ -14,7 +14,6 @@ export default function Home() {
body: JSON.stringify({ input }), body: JSON.stringify({ input }),
}); });
const data = await res.json(); const data = await res.json();
console.log(data);
setWeatherData({ ...data }); setWeatherData({ ...data });
setInput(""); setInput("");
@ -331,8 +330,8 @@ export default function Home() {
</div> </div>
</div> </div>
) : weatherData && weatherData.message ? ( ) : weatherData && weatherData.message ? (
<> <div className={styles.errScr}>
<h1>City not found, try again</h1> <h1 style={{ marginBottom: "30px" }}>City not found, try again!</h1>
<input <input
type="text" type="text"
className={styles.searchInput} className={styles.searchInput}
@ -340,7 +339,7 @@ export default function Home() {
onChange={(e) => setInput(e.target.value)} onChange={(e) => setInput(e.target.value)}
onKeyDown={(e) => something(e)} onKeyDown={(e) => something(e)}
/> />
</> </div>
) : ( ) : (
<h1>Loading data...</h1> <h1>Loading data...</h1>
); );

View File

@ -88,6 +88,10 @@
display: inline; display: inline;
} }
.errScr {
text-align: center;
}
@media only screen and (max-width: 950px) { @media only screen and (max-width: 950px) {
.wrapper { .wrapper {
display: grid; display: grid;