diff --git a/src/app/(surfspots)/layout.tsx b/src/app/(surfspots)/layout.tsx index 603dcf2..dfd8b7a 100644 --- a/src/app/(surfspots)/layout.tsx +++ b/src/app/(surfspots)/layout.tsx @@ -24,8 +24,8 @@ export default async function FavoriteSpotsLayout({ } return ( -
-
+
+
{user && ( @@ -51,7 +51,7 @@ export default async function FavoriteSpotsLayout({
-
+
{currentTide?.tide === "rising" ? ( ) : ( diff --git a/src/app/(surfspots)/spots/[spot_id]/page.tsx b/src/app/(surfspots)/spots/[spot_id]/page.tsx index abe567b..592cb24 100644 --- a/src/app/(surfspots)/spots/[spot_id]/page.tsx +++ b/src/app/(surfspots)/spots/[spot_id]/page.tsx @@ -9,7 +9,7 @@ import type { Database } from "@/app/lib/database.types"; import Link from "next/link"; import { AddFavoriteIcon, ArrowBackIcon } from "@/app/components/icons/icons"; import AddToFavoriteBtn from "@/app/components/AddToFavoriteBtn"; -import SpotInfoAccordeon from "@/app/components/SpotInfoAccordeon"; +import SpotInfo from "@/app/components/SpotInfo"; import { PintxoRange } from "@/app/components/PintxoRange"; import { getCurrentPintxoConditions } from "@/app/utils/surfUtils"; import { DateTime } from "luxon"; @@ -69,14 +69,9 @@ export default async function SpotPage({ return ( <> {spot && ( -
-
- - - -
-
-
+ <> +
+
{spot.name}
@@ -86,7 +81,7 @@ export default async function SpotPage({ user={user} />
-
+
{currentPintxoCondition.map((pintxo, index) => ( ))}
-
- - -
-
+
+ Detailed Weekly Conditions +
+
+ +
+
+ Spot Info +
+
+ +
+ )} ); diff --git a/src/app/components/SpotConditionsWeek.tsx b/src/app/components/SpotConditionsWeek.tsx index a28f169..e17e145 100644 --- a/src/app/components/SpotConditionsWeek.tsx +++ b/src/app/components/SpotConditionsWeek.tsx @@ -39,7 +39,7 @@ export default function SpotConditionsWeek({ {localDateTimes?.map((item, index) => ( {item.split(" ")[0]}
diff --git a/src/app/components/SpotInfo.tsx b/src/app/components/SpotInfo.tsx new file mode 100644 index 0000000..0b63d3c --- /dev/null +++ b/src/app/components/SpotInfo.tsx @@ -0,0 +1,64 @@ +"use client"; +import type { Database } from "../lib/database.types"; +type PintxoConditions = Database["public"]["Tables"]["spot_conditions"]["Row"]; + +export default function SpotInfo({ spot }: { spot: PintxoConditions }) { + return ( +
+
+ {spot.about || "N/A"} +
+
+
+ Best Surf: {spot.best_surf || "N/A"} +
+
+ Board: {spot.board || "N/A"} +
+
+ Surfer: {spot.surfer || "N/A"} +
+
+
+
+ Swell Direction: {spot.swell_direction || "N/A"} +
+
+ Swell Handle: {spot.swell_handle || "N/A"} +
+
+ Seabed: {spot.seabed || "N/A"} +
+
+
+
+ Crowd: {spot.crowd || "N/A"} +
+
+ Season: {spot.season || "N/A"} +
+
+ Wave Type: {spot.wavetype || "N/A"} +
+
+
+
+ Spot Rating: {spot.spot_rating || "N/A"} +
+
+ Water Quality: {spot.water_quality || "N/A"} +
+
+ Drive: Directions +
+
+ + {/*
+ Windy: Windy Forecast +
*/} +
+ ); +} diff --git a/src/app/components/SpotInfoAccordeon.tsx b/src/app/components/SpotInfoAccordeon.tsx deleted file mode 100644 index c349748..0000000 --- a/src/app/components/SpotInfoAccordeon.tsx +++ /dev/null @@ -1,80 +0,0 @@ -"use client"; -import React, { useState } from "react"; -import type { Database } from "../lib/database.types"; -type PintxoConditions = Database["public"]["Tables"]["spot_conditions"]["Row"]; - -export default function SpotInfoAccordeon({ - spot, -}: { - spot: PintxoConditions; -}) { - const [isOpen, setIsOpen] = useState(false); - - const toggleOpen = (): void => { - setIsOpen(!isOpen); - }; - - return ( -
- -
-
- {spot.about || "N/A"} -
-
- Best Surf: {spot.best_surf || "N/A"} -
- {/*
- Board: {spot.board || "N/A"} -
*/} -
- Crowd: {spot.crowd || "N/A"} -
-
- Drive: Directions -
-
- Seabed: {spot.seabed || "N/A"} -
-
- Season: {spot.season || "N/A"} -
-
- Spot Rating: {spot.spot_rating || "N/A"} -
-
- Surfer: {spot.surfer || "N/A"} -
-
- Swell: {spot.swell || "N/A"} -
-
- Swell Direction: {spot.swell_direction || "N/A"} -
-
- Swell Handle: {spot.swell_handle || "N/A"} -
-
- Water Quality: {spot.water_quality || "N/A"} -
-
- Wave Type: {spot.wavetype || "N/A"} -
-
- Windy: Windy Forecast -
-
-
- ); -} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 01c8a6f..53526a8 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -67,7 +67,7 @@ export default async function RootLayout({
-
{children}
+
{children}
);