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 (
| Title | Author | Status | Date | Actions |
|---|---|---|---|---|
| {post.title} | {post.author} | {post.status} | {post.date} |
|
Showing 1-3 of 3 posts