rename some files and add nip 94 widget

This commit is contained in:
Ren Amamiya
2023-08-23 15:18:59 +07:00
parent c97c685149
commit 3455eb701f
34 changed files with 145 additions and 35 deletions

24
src/stores/composer.ts Normal file
View File

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