Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusLukasukas committed Oct 30, 2023
1 parent b9dac85 commit b1749b0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function RootLayout({
return (
<html lang="en" suppressHydrationWarning>
<body
className={`${inter.className}, container mx-auto flex min-h-screen flex-col antialiased selection:bg-black selection:text-white dark:bg-black dark:selection:bg-white dark:selection:text-black`}
className={`${inter.className}, container mx-auto flex min-h-screen flex-col px-[1rem] antialiased selection:bg-black selection:text-white dark:bg-black dark:selection:bg-white dark:selection:text-black`}
>
<NextThemesProvider
attribute="class"
Expand Down
6 changes: 1 addition & 5 deletions components/widgets/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ const OPENWEATHERMAP_TOKEN = process.env.NEXT_PUBLIC_OPEN_WEATHER_API_KEY

export default function Map() {
const { theme } = useTheme()
// const MapTheme = useMemo(() => {
// return theme === "dark" ? "dark" : "light"
// }, [theme])

const MapTheme = useMemo(() => {
return theme === "system"
? window.matchMedia &&
Expand Down Expand Up @@ -80,7 +76,7 @@ export default function Map() {
}, [lat, lon, defaultLat, defaultLon])

return (
<Card className="order-11 col-span-1 h-[25rem] overflow-hidden overscroll-contain p-0 md:p-0 lg:col-span-2 xl:col-span-3">
<Card className="order-11 col-span-2 h-[25rem] overflow-hidden overscroll-contain p-0 md:p-0 xl:col-span-3">
<div className="absolute right-0 z-10 m-2">
<Select value={MapCode} onValueChange={setMapCode}>
<SelectTrigger aria-label="Map layer" className="w-fit">
Expand Down
2 changes: 1 addition & 1 deletion components/widgets/OtherLargeCities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Link from "next/link"

export default function OtherLargeCities() {
return (
<div className="relative order-last h-[25rem] w-full flex-col justify-between">
<div className="relative order-last hidden h-[25rem] w-full flex-col justify-between lg:block">
<h3 className="py-3 font-semibold">Other large cities</h3>
<div className="flex flex-col space-y-3.5">
{OTHER_LARGE_CITIES.map((item) => (
Expand Down
7 changes: 3 additions & 4 deletions components/widgets/WeatherWidgets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default function WeatherWidgets({
uvIndexForToday,
city,
}: WeatherWidgetsProps) {
console.log(data)
return (
<>
<AirPollution airQuality={airQuality} className="order-2 md:order-1" />
Expand Down Expand Up @@ -248,11 +247,11 @@ export default function WeatherWidgets({
<CardFooter>
<p>
{data.rain?.["1h"] !== undefined
? data.rain["1h"] <= 0.1
? data.rain["1h"] <= 0.2
? "Light rain or drizzle. An umbrella may come in handy."
: data.rain["1h"] <= 2.5
? "Moderate rain. You might need an umbrella or raincoat."
: "Heavy rain. Prepare for wet weather."
? "Moderate rain."
: "Heavy rain."
: "Conditions are dry."}
</p>
</CardFooter>
Expand Down

0 comments on commit b1749b0

Please sign in to comment.