chore: remove user store

This commit is contained in:
Steven
2023-03-19 23:40:06 +08:00
parent d11648f2bb
commit d2427f4e5f
6 changed files with 19 additions and 36 deletions

View File

@ -1,15 +1,14 @@
import { Menu, Popover } from "@headlessui/react";
import Link from "next/link";
import { toast } from "react-hot-toast";
import { useChatStore, useMessageStore, useUserStore } from "../../store";
import { getAssistantById, useChatStore, useMessageStore } from "../../store";
import Icon from "../Icon";
const Header = () => {
const userStore = useUserStore();
const chatStore = useChatStore();
const messageStore = useMessageStore();
const currentChat = chatStore.currentChat;
const assistant = userStore.getAssistantById(currentChat?.assistantId)!;
const assistant = getAssistantById(currentChat?.assistantId)!;
const handleClearMessage = () => {
messageStore.clearMessage((message) => message.chatId !== currentChat?.id);