update note actions component

This commit is contained in:
Ren Amamiya
2023-07-16 14:24:19 +07:00
parent e0a14ce6cf
commit abc53a0d9a
15 changed files with 64 additions and 74 deletions

View File

@@ -2,9 +2,9 @@ import { create } from 'zustand';
interface ComposerState {
open: boolean;
reply: { id: string; root: string; pubkey: string };
reply: { id: string; pubkey: string };
toggleModal: (status: boolean) => void;
setReply: (id: string, root: string, pubkey: string) => void;
setReply: (id: string, pubkey: string) => void;
clearReply: () => void;
}
@@ -14,11 +14,11 @@ export const useComposer = create<ComposerState>((set) => ({
toggleModal: (status: boolean) => {
set({ open: status });
},
setReply: (id: string, root: string, pubkey: string) => {
set({ reply: { id: id, root: root, pubkey: pubkey } });
setReply: (id: string, pubkey: string) => {
set({ reply: { id: id, pubkey: pubkey } });
set({ open: true });
},
clearReply: () => {
set({ reply: { id: null, root: null, pubkey: null } });
set({ reply: { id: null, pubkey: null } });
},
}));