Skip to content

Commit

Permalink
🐛 채팅방 미갱신 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
abcxj123 committed Jul 9, 2024
1 parent d61383d commit fca774a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/team/ChatList.tsx
Original file line number Diff line number Diff line change
@@ -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<boolean>(true);

const {
Expand All @@ -25,6 +27,10 @@ const ChatList = () => {
}
}, [isError]);

useEffect(() => {
queryClient.invalidateQueries({ queryKey: ["list"] });
}, []);

return (
<section className="min-h-real-screen3">
<Topbar title="내 채팅" prohibit />
Expand Down

0 comments on commit fca774a

Please sign in to comment.