diff --git a/app/src/components/home/SideBar.tsx b/app/src/components/home/SideBar.tsx index d16817a..37b9456 100644 --- a/app/src/components/home/SideBar.tsx +++ b/app/src/components/home/SideBar.tsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; import { useDispatch, useSelector } from "react-redux"; -import auth, { selectAuthenticated, selectUsername } from "@/store/auth.ts"; +import { selectAuthenticated, selectUsername } from "@/store/auth.ts"; import { closeMarket, selectCurrent, @@ -8,7 +8,7 @@ import { selectMaskItem, useConversationActions, } from "@/store/chat.ts"; -import React, { useCallback, useRef, useState } from "react"; +import React, { useRef, useState } from "react"; import { ConversationInstance } from "@/api/types.tsx"; import { useToast } from "@/components/ui/use-toast.ts"; import { extractMessage, filterMessage } from "@/utils/processor.ts"; @@ -46,9 +46,6 @@ import { goAuth } from "@/utils/app.ts"; import Avatar from "@/components/Avatar.tsx"; import { cn } from "@/components/ui/lib/utils.ts"; import { getNumberMemory } from "@/utils/memory.ts"; -import { refreshSubscription } from "@/store/subscription.ts"; -import { refreshQuota } from "@/store/quota.ts"; -import { AppDispatch } from "@/store"; type Operation = { target: ConversationInstance | null; @@ -332,25 +329,11 @@ function SidebarConversationList({ function SidebarMenu() { const username = useSelector(selectUsername); - const dispatch: AppDispatch = useDispatch(); - const updateQuota = useCallback(() => { - dispatch(refreshQuota()); // 调用 refreshQuota 更新配额 - }, [dispatch]); - const handleRefreshSubscription = async () => { - if (!auth) { - return; - } - await refreshSubscription(dispatch); - }; return (
-