From b8390bfad9af5a24b44965166c371a0ecf0912c3 Mon Sep 17 00:00:00 2001 From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com> Date: Fri, 23 Aug 2024 18:02:50 +0530 Subject: [PATCH] profile update --- .../Investor_Management/InvestorDetails/ProfileView.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx b/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx index b875600..01b549c 100644 --- a/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx +++ b/src/Pages/Investor_Management/InvestorDetails/ProfileView.jsx @@ -36,11 +36,15 @@ const ProfileView = () => { const id = params?.id; - const { data, isLoading, errors } = useGetInvestorsDetailsByIdQuery(id, { + const { data, isLoading, errors, refetch} = useGetInvestorsDetailsByIdQuery(id, { skip: !id, }); + // Use useEffect to refetch data when the component mounts + useEffect(() => { + refetch(); +}, [refetch]); const foundObject = data?.data;