From fca774a6ca8b2d9eb741226887c52b3fc5aa141f Mon Sep 17 00:00:00 2001 From: abcxj123 Date: Tue, 9 Jul 2024 15:48:09 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=EC=B1=84=ED=8C=85=EB=B0=A9=20?= =?UTF-8?q?=EB=AF=B8=EA=B0=B1=EC=8B=A0=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/team/ChatList.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/team/ChatList.tsx b/src/pages/team/ChatList.tsx index 222e2f3..d7111e7 100644 --- a/src/pages/team/ChatList.tsx +++ b/src/pages/team/ChatList.tsx @@ -1,9 +1,11 @@ import { useEffect, useState } from "react"; import { ChatListItem, Topbar } from "../../components"; -import { useQuery } from "@tanstack/react-query"; +import { useQuery, useQueryClient } from "@tanstack/react-query"; import { teamApi } from "../../apis/domains/teamApi"; const ChatList = () => { + const queryClient = useQueryClient(); + const [isAll, setIsAll] = useState(true); const { @@ -25,6 +27,10 @@ const ChatList = () => { } }, [isError]); + useEffect(() => { + queryClient.invalidateQueries({ queryKey: ["list"] }); + }, []); + return (