rename comps
This commit is contained in:
parent
e617de2020
commit
f20eb30d8d
@ -1,9 +1,9 @@
|
|||||||
import { convertTime, timeToAMPM } from "../services/converters";
|
import { convertTime, timeToAMPM } from "../services/converters";
|
||||||
import { isPM } from "../services/utils";
|
import { isPM } from "../services/utils";
|
||||||
|
|
||||||
import styles from "./Dates.module.css";
|
import styles from "./DateAndTime.module.css";
|
||||||
|
|
||||||
const Dates = ({ weatherData, systemUsed }) => {
|
const DateAndTime = ({ weatherData, systemUsed }) => {
|
||||||
var weekday = [
|
var weekday = [
|
||||||
"Sunday",
|
"Sunday",
|
||||||
"Monday",
|
"Monday",
|
||||||
@ -39,4 +39,4 @@ const Dates = ({ weatherData, systemUsed }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Dates;
|
export default DateAndTime;
|
@ -1,6 +1,6 @@
|
|||||||
import styles from "./SwitchBox.module.css";
|
import styles from "./UnitSwitch.module.css";
|
||||||
|
|
||||||
const SwitchBox = ({ onClick, systemUsed }) => {
|
const UnitSwitch = ({ onClick, systemUsed }) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<p
|
<p
|
||||||
@ -21,4 +21,4 @@ const SwitchBox = ({ onClick, systemUsed }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SwitchBox;
|
export default UnitSwitch;
|
@ -3,10 +3,10 @@ import { useState, useEffect } from "react";
|
|||||||
import MainCard from "../components/MainCard";
|
import MainCard from "../components/MainCard";
|
||||||
import ContentBox from "../components/ContentBox";
|
import ContentBox from "../components/ContentBox";
|
||||||
import Header from "../components/Header";
|
import Header from "../components/Header";
|
||||||
import Dates from "../components/Dates";
|
import DateAndTime from "../components/DateAndTime";
|
||||||
import Search from "../components/Search";
|
import Search from "../components/Search";
|
||||||
import Metrics from "../components/Metrics";
|
import Metrics from "../components/Metrics";
|
||||||
import SwitchBox from "../components/SwitchBox";
|
import UnitSwitch from "../components/UnitSwitch";
|
||||||
import LoadingScreen from "../components/LoadingScreen";
|
import LoadingScreen from "../components/LoadingScreen";
|
||||||
import ErrorScreen from "../components/ErrorScreen";
|
import ErrorScreen from "../components/ErrorScreen";
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ const App = () => {
|
|||||||
/>
|
/>
|
||||||
<ContentBox>
|
<ContentBox>
|
||||||
<Header>
|
<Header>
|
||||||
<Dates weatherData={weatherData} systemUsed={systemUsed} />
|
<DateAndTime weatherData={weatherData} systemUsed={systemUsed} />
|
||||||
<Search
|
<Search
|
||||||
placeHolder="Search a city..."
|
placeHolder="Search a city..."
|
||||||
value={input}
|
value={input}
|
||||||
@ -72,7 +72,7 @@ const App = () => {
|
|||||||
/>
|
/>
|
||||||
</Header>
|
</Header>
|
||||||
<Metrics data={weatherData} systemUsed={systemUsed} />
|
<Metrics data={weatherData} systemUsed={systemUsed} />
|
||||||
<SwitchBox onClick={changeSystem} systemUsed={systemUsed} />
|
<UnitSwitch onClick={changeSystem} systemUsed={systemUsed} />
|
||||||
</ContentBox>
|
</ContentBox>
|
||||||
</div>
|
</div>
|
||||||
) : weatherData && weatherData.message ? (
|
) : weatherData && weatherData.message ? (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user