import { useState } from 'react'; import { Search, Plus, Edit2, Trash2, ChevronLeft, ChevronRight } from 'lucide-react'; export default function AdminPanel() { const [posts, setPosts] = useState([ { id: 1, title: 'Getting Started with React', status: 'Published', date: '2024-01-15', author: 'John Doe' }, { id: 2, title: 'CSS Best Practices', status: 'Draft', date: '2024-01-16', author: 'Jane Smith' }, { id: 3, title: 'JavaScript Tips and Tricks', status: 'Published', date: '2024-01-17', author: 'Mike Johnson' }, ]); const [selectedTab, setSelectedTab] = useState('posts'); const [searchTerm, setSearchTerm] = useState(''); const filteredPosts = posts.filter(post => post.title.toLowerCase().includes(searchTerm.toLowerCase()) ); return (
{/* Sidebar */}

Blog Admin

{/* Main Content */}

Blog Posts

{/* Search Bar */}
setSearchTerm(e.target.value)} className="w-full rounded-lg border border-gray-300 py-2 pl-10 pr-4 focus:border-blue-500 focus:outline-none" />
{/* Posts Table */}
{filteredPosts.map((post) => ( ))}
Title Author Status Date Actions
{post.title} {post.author} {post.status} {post.date}
{/* Pagination */}

Showing 1-3 of 3 posts

); }