From 3cfb5f05d5642c4932e6a0a56c9a59063b559066 Mon Sep 17 00:00:00 2001 From: abhimanyurajeesh Date: Tue, 21 Jan 2025 18:15:44 +0530 Subject: [PATCH] Remove unused queryClient and refetchUserData function in UserHome component --- src/components/Users/UserHome.tsx | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/components/Users/UserHome.tsx b/src/components/Users/UserHome.tsx index 186d8d0c9a0..ae377f5e60a 100644 --- a/src/components/Users/UserHome.tsx +++ b/src/components/Users/UserHome.tsx @@ -1,4 +1,4 @@ -import { useQuery, useQueryClient } from "@tanstack/react-query"; +import { useQuery } from "@tanstack/react-query"; import { Link } from "raviger"; import { useTranslation } from "react-i18next"; @@ -31,7 +31,6 @@ export default function UserHome(props: UserHomeProps) { let { username } = props; const { t } = useTranslation(); const authUser = useAuthUser(); - const queryClient = useQueryClient(); if (!username) { username = authUser.username; @@ -46,12 +45,6 @@ export default function UserHome(props: UserHomeProps) { enabled: Boolean(username), }); - const invalidateUserDetails = () => { - queryClient.invalidateQueries({ - queryKey: ["getUserDetails", username], - }); - }; - if (isLoading || !userData) { return ; } @@ -135,12 +128,7 @@ export default function UserHome(props: UserHomeProps) { - + }