add mention to composer

This commit is contained in:
Ren Amamiya
2023-07-21 18:07:17 +07:00
parent 64cd17389d
commit 17d2a8cb56
11 changed files with 250 additions and 183 deletions

View File

@@ -2,7 +2,7 @@ import { create } from 'zustand';
interface ComposerState {
open: boolean;
reply: { id: string; pubkey: string };
reply: { id: string; pubkey: string; root?: string };
toggleModal: (status: boolean) => 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, pubkey: string) => {
set({ reply: { id: id, pubkey: pubkey } });
setReply: (id: string, pubkey: string, root?: string) => {
set({ reply: { id: id, root: root, pubkey: pubkey } });
set({ open: true });
},
clearReply: () => {
set({ reply: { id: null, pubkey: null } });
set({ reply: { id: null, root: null, pubkey: null } });
},
}));