diff --git a/src/store/contentStore.ts b/src/store/contentStore.ts new file mode 100644 index 0000000..f833910 --- /dev/null +++ b/src/store/contentStore.ts @@ -0,0 +1,75 @@ +import { create } from "zustand"; +import { persist } from "zustand/middleware"; +import { v4 as uuidv4 } from "uuid"; +import type { ContentState, Post } from "@/types"; + +const SAMPLE_POSTS: Post[] = [ + { + id: "1", + title: "Welcome to Personal CMS", + slug: "welcome-to-personal-cms", + content: + "
This is your first post. You can edit or delete it, and start creating your own content!
", + excerpt: "A quick introduction to your new CMS.", + status: "published", + tags: ["welcome", "cms"], + views: 42, + createdAt: new Date().toISOString(), + updatedAt: new Date().toISOString(), + }, + { + id: "2", + title: "Getting Started with Content Creation", + slug: "getting-started-content-creation", + content: + "Learn how to create engaging content using the built-in rich text editor.
", + excerpt: "Tips and tricks for creating great content.", + status: "draft", + tags: ["guide", "content"], + views: 0, + createdAt: new Date().toISOString(), + updatedAt: new Date().toISOString(), + }, +]; + +export const useContentStore = create