import { createClient } from "@/lib/supabase-server" import { Button } from "@/components/ui/button" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table" import { Plus } from "lucide-react" import Link from "next/link" import { Badge } from "@/components/ui/badge" export default async function ProductsPage() { const supabase = createClient() const { data: products } = await supabase .from("products") .select("*") .order("created_at", { ascending: false }) return (

Ürünler

Ad Kategori Fiyat İşlemler {products?.length === 0 ? ( Henüz ürün eklenmemiş. ) : ( products?.map((product) => ( {product.name} {product.category} ₺{product.price} )) )}
) }