This commit is contained in:
Ren Amamiya
2023-06-27 20:53:52 +07:00
parent a29ef03198
commit 3fe601cfc6
20 changed files with 159 additions and 110 deletions

View File

@@ -1,9 +1,18 @@
import { create } from "zustand";
export const useComposer = create((set) => ({
interface ComposerState {
open: boolean;
reply: null;
repost: { id: string; pubkey: string };
toggleModal: (status: boolean) => void;
setRepost: (id: string, pubkey: string) => void;
clearRepost: () => void;
}
export const useComposer = create<ComposerState>((set) => ({
open: false,
repost: { id: null, pubkey: null },
reply: null,
repost: { id: null, pubkey: null },
toggleModal: (status: boolean) => {
set({ open: status });
if (!status) {

View File

@@ -64,9 +64,9 @@ export const OPENGRAPH = {
};
export const FULL_RELAYS = [
"wss://relay.damus.io",
"wss://relay.nostr.band/all",
"wss://relayable.org",
"wss://nostr.mutinywallet.com",
"wss://relay.damus.io",
"wss://relay.nostrgraph.net",
"wss://relay.nostr.band/all",
"wss://nostr.mutinywallet.com",
];

View File

@@ -2,7 +2,7 @@ import { create } from "zustand";
interface NoteState {
hasNewNote: boolean;
toggleHasNewNote: (by: boolean) => void;
toggleHasNewNote: (status: boolean) => void;
}
export const useNote = create<NoteState>((set) => ({