Add PDF modal and selectedPost setter
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -18,6 +18,7 @@ type AppState = {
|
||||
endorseUser: (userId: string, specialty: string) => void
|
||||
endorsePost: (postId: string) => void
|
||||
attachPDFToPost: (postId: string, file: File) => void
|
||||
setSelectedPost: (id: string | null) => void
|
||||
toggleCreatePost: () => void
|
||||
}
|
||||
|
||||
@@ -91,6 +92,8 @@ const useAppStore = create<AppState>((set, get) => ({
|
||||
}))
|
||||
},
|
||||
|
||||
setSelectedPost: (id) => set(() => ({ selectedPostId: id })),
|
||||
|
||||
toggleCreatePost: () => set((state) => ({ ui: { isCreatePostOpen: !state.ui.isCreatePostOpen } })),
|
||||
}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user