move space logic to zustand

This commit is contained in:
Ren Amamiya
2023-06-02 18:06:19 +07:00
parent dffe300a5f
commit 48e453fe5c
8 changed files with 126 additions and 42 deletions

View File

@@ -3,7 +3,7 @@ import { create } from "zustand";
import { immer } from "zustand/middleware/immer";
export const useChats = create(
immer((set: any, get: any) => ({
immer((set: any) => ({
chats: [],
fetch: async (pubkey: string) => {
const response: any = await getChatsByPubkey(pubkey);