update repost
This commit is contained in:
20
src/stores/composer.tsx
Normal file
20
src/stores/composer.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { create } from "zustand";
|
||||
|
||||
export const useComposer = create((set) => ({
|
||||
open: false,
|
||||
repost: { id: null, pubkey: null },
|
||||
reply: null,
|
||||
toggleModal: (status: boolean) => {
|
||||
set({ open: status });
|
||||
if (!status) {
|
||||
set({ repost: { id: null, pubkey: null } });
|
||||
}
|
||||
},
|
||||
setRepost: (id: string, pubkey: string) => {
|
||||
set({ repost: { id: id, pubkey: pubkey } });
|
||||
set({ open: true });
|
||||
},
|
||||
clearRepost: () => {
|
||||
set({ repost: { id: null, pubkey: null } });
|
||||
},
|
||||
}));
|
||||
Reference in New Issue
Block a user