|
1 | | -import { createServerClient } from '@supabase/ssr' |
2 | | -import { cookies } from 'next/headers' |
3 | | -import { Plus, Folder, Edit3, Trash2 } from 'lucide-react' |
4 | | -import Link from 'next/link' |
5 | | - |
6 | | -export default async function AdminCategories() { |
7 | | - const cookieStore = await cookies() |
8 | | - const supabase = createServerClient( |
9 | | - process.env.NEXT_PUBLIC_SUPABASE_URL!, |
10 | | - process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, |
11 | | - { |
12 | | - cookies: { |
13 | | - get(name: string) { |
14 | | - return cookieStore.get(name)?.value |
15 | | - }, |
16 | | - }, |
17 | | - } |
18 | | - ) |
19 | | - |
20 | | - const { data: categories } = await supabase |
21 | | - .from('categories') |
22 | | - .select('*') |
23 | | - .order('name', { ascending: true }) |
| 1 | +import React from 'react'; |
24 | 2 |
|
| 3 | +const AdminCategoriesPage = () => { |
25 | 4 | return ( |
26 | | - <div className="space-y-12"> |
27 | | - <div className="flex items-end justify-between"> |
28 | | - <div> |
29 | | - <h1 className="text-4xl font-serif text-white mb-2 italic tracking-tight">Taxonomy</h1> |
30 | | - <p className="text-zinc-500 text-xs uppercase tracking-[0.4em] font-medium">Category Architecture</p> |
31 | | - </div> |
32 | | - <button className="bg-gold text-black px-6 py-3 text-[11px] font-bold uppercase tracking-[0.2em] flex items-center gap-2 hover:bg-gold/90 transition-all active:scale-95"> |
33 | | - <Plus className="w-4 h-4" /> |
34 | | - New Category |
35 | | - </button> |
36 | | - </div> |
37 | | - |
38 | | - <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> |
39 | | - {categories?.length ? ( |
40 | | - categories.map((category) => ( |
41 | | - <div key={category.id} className="bg-zinc-950 border border-white/5 p-8 group hover:border-gold/30 transition-all duration-500"> |
42 | | - <div className="flex items-start justify-between mb-6"> |
43 | | - <div className="w-12 h-12 bg-white/5 flex items-center justify-center border border-white/5 group-hover:border-gold/20 transition-colors"> |
44 | | - <Folder className="w-5 h-5 text-zinc-500 group-hover:text-gold transition-colors" /> |
45 | | - </div> |
46 | | - <div className="flex items-center gap-3 opacity-0 group-hover:opacity-100 transition-opacity"> |
47 | | - <button title="Edit" className="text-zinc-500 hover:text-gold transition-colors"><Edit3 className="w-4 h-4" /></button> |
48 | | - <button title="Delete" className="text-zinc-500 hover:text-red-500 transition-colors"><Trash2 className="w-4 h-4" /></button> |
49 | | - </div> |
50 | | - </div> |
51 | | - <h3 className="text-xl font-serif text-white mb-2 tracking-wide uppercase">{category.name}</h3> |
52 | | - <p className="text-zinc-500 text-[11px] uppercase tracking-widest font-bold mb-4">{category.slug}</p> |
53 | | - <p className="text-zinc-600 text-[11px] leading-relaxed line-clamp-2"> |
54 | | - {category.description || 'No description provided for this collection.'} |
55 | | - </p> |
56 | | - </div> |
57 | | - )) |
58 | | - ) : ( |
59 | | - <div className="col-span-full py-24 text-center border-2 border-dashed border-white/5"> |
60 | | - <Folder className="w-12 h-12 text-zinc-800 mx-auto mb-4" /> |
61 | | - <p className="text-zinc-500 text-xs uppercase tracking-[0.3em]">No custom categories defined</p> |
62 | | - </div> |
63 | | - )} |
64 | | - </div> |
| 5 | + <div> |
| 6 | + <h1>Admin Categories</h1> |
| 7 | + {/* Add your category management components here */} |
65 | 8 | </div> |
66 | | - ) |
67 | | -} |
| 9 | + ); |
| 10 | +}; |
| 11 | + |
| 12 | +export default AdminCategoriesPage; |
0 commit comments