import { createClient } from "@/lib/supabase/server"; import { redirect } from "next/navigation"; import Link from "next/link"; import Image from "next/image"; import { ChevronLeft, Play } from "lucide-react"; export default async function HistoryPage() { const supabase = await createClient(); const { data: { user } } = await supabase.auth.getUser(); if (!user) { redirect("/login"); } const { data: history, error } = await supabase .from("history") .select("*") .eq("user_id", user.id) .order("updated_at", { ascending: false }); if (error) { console.error("Error fetching history:", error); return
No history yet.
Start watching