diff --git a/src/app/dashboard/posts/page.tsx b/src/app/dashboard/posts/page.tsx new file mode 100644 index 0000000..cf107bf --- /dev/null +++ b/src/app/dashboard/posts/page.tsx @@ -0,0 +1,75 @@ +"use client"; + +import { useState } from "react"; +import Link from "next/link"; +import { useContentStore } from "@/store/contentStore"; +import PostsTable from "@/components/posts/PostsTable"; +import { Plus, Search } from "lucide-react"; + +export default function PostsPage() { + const { posts } = useContentStore(); + const [search, setSearch] = useState(""); + const [statusFilter, setStatusFilter] = useState< + "all" | "published" | "draft" + >("all"); + + const filtered = posts.filter((post) => { + const matchesSearch = + post.title.toLowerCase().includes(search.toLowerCase()) || + post.excerpt?.toLowerCase().includes(search.toLowerCase()); + const matchesStatus = + statusFilter === "all" || post.status === statusFilter; + return matchesSearch && matchesStatus; + }); + + return ( +
+ Manage all your blog posts and articles. +
+