From 1be462b7db8ddf969f8fd28a23e8cc57496019cb Mon Sep 17 00:00:00 2001 From: ChrQR Date: Mon, 13 May 2024 09:22:58 +0200 Subject: [PATCH] fixed overflow --- components/DailyCard/CardContainer.tsx | 37 ++++++++++++++------------ 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/components/DailyCard/CardContainer.tsx b/components/DailyCard/CardContainer.tsx index d87c33f..2b9ea93 100644 --- a/components/DailyCard/CardContainer.tsx +++ b/components/DailyCard/CardContainer.tsx @@ -1,20 +1,23 @@ import { Forecast } from "@/types/types"; import DailyCard from "./DailyCard"; -export default function CardContainer(props: {weather: Forecast}) { - const weather = props.weather; - return ( -
- {weather.daily && weather.daily.apparent_temperature_max.map((temp, index) => ( - index > 0 && - index < 7 && // Ensure we only render the next 6 days - - ))} -
- ) -}; \ No newline at end of file +export default function CardContainer(props: { weather: Forecast }) { + const weather = props.weather; + return ( +
+ {weather.daily && + weather.daily.apparent_temperature_max.map( + (temp, index) => + index > 0 && + index < 7 && ( // Ensure we only render the next 6 days + + ) + )} +
+ ); +}