mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
linting and cleanup
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import mapIcon from "utils/condition-map";
|
||||
|
||||
export default function Icon({ condition, timeOfDay }) {
|
||||
const Icon = mapIcon(condition, timeOfDay);
|
||||
const IconComponent = mapIcon(condition, timeOfDay);
|
||||
|
||||
return <Icon className="w-10 h-10 text-theme-800 dark:text-theme-200"></Icon>;
|
||||
return <IconComponent className="w-10 h-10 text-theme-800 dark:text-theme-200" />;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import { BiError } from "react-icons/bi";
|
||||
import Icon from "./icon";
|
||||
|
||||
export default function WeatherApi({ options }) {
|
||||
console.log(options);
|
||||
const { data, error } = useSWR(`/api/widgets/weather?${new URLSearchParams(options).toString()}`);
|
||||
|
||||
if (error) {
|
||||
@@ -24,11 +23,11 @@ export default function WeatherApi({ options }) {
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return <div className="flex flex-row items-center justify-end"></div>;
|
||||
return <div className="flex flex-row items-center justify-end" />;
|
||||
}
|
||||
|
||||
if (data.error) {
|
||||
return <div className="flex flex-row items-center justify-end"></div>;
|
||||
return <div className="flex flex-row items-center justify-end" />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user