"use client"; import { useState } from "react"; import { useRouter } from "next/navigation"; import { useSession } from "next-auth/react"; import Link from "next/link"; import { createTripAction } from "@/features/trip/actions"; const SAMPLE_MOUNTAINS = [ { name: "Gunung Papandayan", location: "Garut, Jawa Barat" }, { name: "Gunung Ciremai", location: "Kuningan, Jawa Barat" }, { name: "Gunung Pangrango", location: "Bogor/Cianjur, Jawa Barat" }, { name: "Gunung Gede", location: "Bogor/Cianjur, Jawa Barat" }, { name: "Gunung Tangkuban Parahu", location: "Bandung, Jawa Barat" }, { name: "Gunung Bukit Tunggul", location: "Bandung, Jawa Barat" }, { name: "Gunung Malabar", location: "Bandung, Jawa Barat" }, { name: "Gunung Guntur", location: "Garut, Jawa Barat" }, ]; export default function CreateTripPage() { const { data: session } = useSession(); const router = useRouter(); const [error, setError] = useState(""); const [loading, setLoading] = useState(false); if (!session?.user) { return (
Kamu harus login untuk membuat trip.
LoginAjak teman baru naik gunung bareng!