diff --git a/components/ErrorScreen.js b/components/ErrorScreen.js
index 1f7c5e3..b6b4653 100644
--- a/components/ErrorScreen.js
+++ b/components/ErrorScreen.js
@@ -1,16 +1,10 @@
import styles from "./ErrorScreen.module.css";
-const ErrorScreen = ({ onFocus, onChange, onKeyDown }) => {
+const ErrorScreen = ({ errorMessage, children }) => {
return (
-
City not found, try again!
-
+ {errorMessage}
+ {children}
);
};
diff --git a/components/ErrorScreen.module.css b/components/ErrorScreen.module.css
index 3b4f70b..346d259 100644
--- a/components/ErrorScreen.module.css
+++ b/components/ErrorScreen.module.css
@@ -8,17 +8,3 @@
.message {
margin-bottom: 30px;
}
-
-.input {
- max-width: 100%;
- margin-bottom: 20px;
- height: 40px;
- border: none;
- padding: 0 10px;
- color: #303030;
- font-size: 20px;
- text-align: right;
- border-radius: 10px;
- font-family: "Varela Round", sans-serif;
- font-size: 18px;
-}
diff --git a/components/LoadingScreen.js b/components/LoadingScreen.js
index d8505db..fe7b771 100644
--- a/components/LoadingScreen.js
+++ b/components/LoadingScreen.js
@@ -1,9 +1,9 @@
import styles from "./LoadingScreen.module.css";
-const LoadingScreen = () => {
+const LoadingScreen = ({ loadingMessage }) => {
return (
-
Loading data...
+ {loadingMessage}
);
};
diff --git a/pages/index.js b/pages/index.js
index 0113e53..921456e 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -74,13 +74,15 @@ const App = () => {
) : weatherData && weatherData.message ? (
- (e.target.value = "")}
- onChange={(e) => setInput(e.target.value)}
- onKeyDown={(e) => enterKeydown(e)}
- />
+
+ (e.target.value = "")}
+ onChange={(e) => setInput(e.target.value)}
+ onKeyDown={(e) => enterKeydown(e)}
+ />
+
) : (
-
+
);
};