Skip to content

Commit f6da0cf

Browse files
committed
Simplify admin Leela page to use only AI Generator
1 parent d918aa6 commit f6da0cf

1 file changed

Lines changed: 8 additions & 47 deletions

File tree

web/src/app/admin/leela/page.tsx

Lines changed: 8 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import { useState, useEffect } from 'react';
55
import Link from 'next/link';
6-
import { Plus, Edit, Loader2, Sparkles, ChevronDown, PenLine, Bot } from 'lucide-react';
6+
import { Edit, Loader2, Bot } from 'lucide-react';
77
import DeleteIconButton from '@/components/admin/DeleteIconButton';
88
import { getLeelasPaged } from '@/actions/content';
99

@@ -13,7 +13,6 @@ export default function AdminLeelaPage() {
1313
const [page, setPage] = useState(1);
1414
const [hasMore, setHasMore] = useState(false);
1515
const [total, setTotal] = useState(0);
16-
const [isAddMenuOpen, setIsAddMenuOpen] = useState(false);
1716

1817
useEffect(() => {
1918
fetchLeelas(1, true);
@@ -59,51 +58,13 @@ export default function AdminLeelaPage() {
5958
<h1 className="text-xl md:text-3xl font-black text-gray-900 tracking-tight">Leela Stories</h1>
6059
<p className="text-xs md:text-sm text-gray-500 font-medium">Manage {total} stories and plays of Sai Baba</p>
6160
</div>
62-
<div className="relative">
63-
<button
64-
onClick={() => setIsAddMenuOpen(!isAddMenuOpen)}
65-
className="flex items-center justify-center space-x-2 bg-ochre text-white px-5 py-3 rounded-xl hover:bg-gold transition-all shadow-lg shadow-ochre/20 whitespace-nowrap active:scale-95 z-20 relative"
66-
>
67-
<Plus className="w-5 h-5" />
68-
<span className="font-black text-xs uppercase tracking-widest">Add Story</span>
69-
<ChevronDown className={`w-4 h-4 transition-transform duration-300 ${isAddMenuOpen ? 'rotate-180' : ''}`} />
70-
</button>
71-
72-
{isAddMenuOpen && (
73-
<>
74-
<div
75-
className="fixed inset-0 z-10"
76-
onClick={() => setIsAddMenuOpen(false)}
77-
/>
78-
<div className="absolute right-0 top-full mt-2 w-56 bg-white rounded-xl shadow-xl border border-gray-100 p-2 z-30 animate-in zoom-in-95 duration-200 origin-top-right">
79-
<Link
80-
href="/admin/leela/new"
81-
className="flex items-center gap-3 w-full px-4 py-3 text-sm font-bold text-gray-700 hover:bg-gray-50 rounded-lg transition-colors group"
82-
>
83-
<div className="w-8 h-8 rounded-lg bg-ochre/10 flex items-center justify-center group-hover:bg-ochre group-hover:text-white transition-colors text-ochre">
84-
<PenLine className="w-4 h-4" />
85-
</div>
86-
<div className="flex flex-col items-start">
87-
<span>Manual Entry</span>
88-
<span className="text-[10px] text-gray-400 font-normal">Write from scratch</span>
89-
</div>
90-
</Link>
91-
<Link
92-
href="/admin/leela/generate"
93-
className="flex items-center gap-3 w-full px-4 py-3 text-sm font-bold text-gray-700 hover:bg-gray-50 rounded-lg transition-colors group"
94-
>
95-
<div className="w-8 h-8 rounded-lg bg-purple-50 flex items-center justify-center group-hover:bg-purple-600 group-hover:text-white transition-colors text-purple-600">
96-
<Bot className="w-4 h-4" />
97-
</div>
98-
<div className="flex flex-col items-start">
99-
<span>AI Generator</span>
100-
<span className="text-[10px] text-gray-400 font-normal">From YouTube transcript</span>
101-
</div>
102-
</Link>
103-
</div>
104-
</>
105-
)}
106-
</div>
61+
<Link
62+
href="/admin/leela/generate"
63+
className="flex items-center justify-center space-x-2 bg-ochre text-white px-5 py-3 rounded-xl hover:bg-gold transition-all shadow-lg shadow-ochre/20 whitespace-nowrap active:scale-95"
64+
>
65+
<Bot className="w-5 h-5" />
66+
<span className="font-black text-xs uppercase tracking-widest">AI Generator</span>
67+
</Link>
10768
</div>
10869

10970
{/* Desktop View: Table */}

0 commit comments

Comments
 (0)