code cleanup

This commit is contained in:
madarsbiss 2021-09-20 22:50:04 +03:00
parent b0e3083bfd
commit b76e971880
4 changed files with 7 additions and 9 deletions

View File

@ -1,4 +1,3 @@
import React from "react";
import Image from "next/image";
const MetricCard = ({ title, iconSrc, metric, unit = "", styles }) => {

View File

@ -1,4 +1,3 @@
import React from "react";
import { degToCompass } from "../services/converters";
import {
getTime,

View File

@ -5,7 +5,7 @@ import Metrics from "./components/Metrics";
import { convertTime, ctoF, timeToAMPM } from "./services/converters";
import { isPM } from "./services/utils";
import styles from "../styles/Home.module.css";
import styles from "../styles/App.module.css";
const App = () => {
const [input, setInput] = useState("Riga");
@ -24,16 +24,16 @@ const App = () => {
setInput("");
};
const enterKeydown = (event) => {
if (event.keyCode === 13) {
getData();
}
};
useEffect(() => {
getData();
}, []);
const enterKeydown = (e) => {
if (e.keyCode === 13) {
getData();
}
};
const changeSystem = () =>
systemUsed == "metric"
? setSystemUsed("imperial")