add hashtag support in composer

This commit is contained in:
Ren Amamiya
2023-07-25 17:45:32 +07:00
parent 8d761caf3e
commit e30ca0ff82
9 changed files with 56 additions and 35 deletions

View File

@@ -4,21 +4,21 @@ interface ComposerState {
open: boolean;
reply: { id: string; pubkey: string; root?: string };
toggleModal: (status: boolean) => void;
setReply: (id: string, pubkey: string) => void;
setReply: (id: string, pubkey: string, root?: string) => void;
clearReply: () => void;
}
export const useComposer = create<ComposerState>((set) => ({
open: false,
reply: { id: null, root: null, pubkey: null },
reply: { id: null, pubkey: null, root: null },
toggleModal: (status: boolean) => {
set({ open: status });
},
setReply: (id: string, pubkey: string, root?: string) => {
set({ reply: { id: id, root: root, pubkey: pubkey } });
set({ reply: { id: id, pubkey: pubkey, root: root } });
set({ open: true });
},
clearReply: () => {
set({ reply: { id: null, root: null, pubkey: null } });
set({ reply: { id: null, pubkey: null, root: null } });
},
}));