rename comps

This commit is contained in:
madarsbiss 2021-09-22 16:35:41 +03:00
parent e617de2020
commit f20eb30d8d
5 changed files with 10 additions and 10 deletions

View File

@ -1,9 +1,9 @@
import { convertTime, timeToAMPM } from "../services/converters";
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 = [
"Sunday",
"Monday",
@ -39,4 +39,4 @@ const Dates = ({ weatherData, systemUsed }) => {
);
};
export default Dates;
export default DateAndTime;

View File

@ -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 (
<div className={styles.wrapper}>
<p
@ -21,4 +21,4 @@ const SwitchBox = ({ onClick, systemUsed }) => {
);
};
export default SwitchBox;
export default UnitSwitch;

View File

@ -3,10 +3,10 @@ import { useState, useEffect } from "react";
import MainCard from "../components/MainCard";
import ContentBox from "../components/ContentBox";
import Header from "../components/Header";
import Dates from "../components/Dates";
import DateAndTime from "../components/DateAndTime";
import Search from "../components/Search";
import Metrics from "../components/Metrics";
import SwitchBox from "../components/SwitchBox";
import UnitSwitch from "../components/UnitSwitch";
import LoadingScreen from "../components/LoadingScreen";
import ErrorScreen from "../components/ErrorScreen";
@ -56,7 +56,7 @@ const App = () => {
/>
<ContentBox>
<Header>
<Dates weatherData={weatherData} systemUsed={systemUsed} />
<DateAndTime weatherData={weatherData} systemUsed={systemUsed} />
<Search
placeHolder="Search a city..."
value={input}
@ -72,7 +72,7 @@ const App = () => {
/>
</Header>
<Metrics data={weatherData} systemUsed={systemUsed} />
<SwitchBox onClick={changeSystem} systemUsed={systemUsed} />
<UnitSwitch onClick={changeSystem} systemUsed={systemUsed} />
</ContentBox>
</div>
) : weatherData && weatherData.message ? (