From 48dac331d9931b652515cf196c97f12b9374f8b6 Mon Sep 17 00:00:00 2001 From: patela22 <39590072+patela22@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:26:07 -0400 Subject: [PATCH 1/7] Update client/services/file.ts Co-authored-by: Matt McCoy <59743922+MattCMcCoy@users.noreply.github.com> --- client/services/file.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/services/file.ts b/client/services/file.ts index 1d0b0fd..83586e3 100644 --- a/client/services/file.ts +++ b/client/services/file.ts @@ -141,5 +141,5 @@ export const useAllFileByGroup = (groupId: number) => { const { data, refetch, isFetching } = queryResult; - return { data, refetch, isFetching }; + return { groupFiles, refetchGroupFiles, isFetching }; }; From 9a3e0c93298808be69fc01679dcb41b6dd6a3407 Mon Sep 17 00:00:00 2001 From: patela22 <39590072+patela22@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:26:20 -0400 Subject: [PATCH 2/7] Update client/services/file.ts Co-authored-by: Matt McCoy <59743922+MattCMcCoy@users.noreply.github.com> --- client/services/file.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/services/file.ts b/client/services/file.ts index 83586e3..d21b695 100644 --- a/client/services/file.ts +++ b/client/services/file.ts @@ -127,7 +127,7 @@ export const useFile = () => { export const useFileByGroup = (groupId: number, fileName: string) => { const { data: file } = useQuery({ queryFn: () => getFile({ groupId, fileName }), - queryKey: ['getFile'] + queryKey: ['getFile', groupId, fileName] }); return { file }; From 0a113cb2b74e40d6a9954c37a69a45c6ebfb322b Mon Sep 17 00:00:00 2001 From: patela22 <39590072+patela22@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:26:31 -0400 Subject: [PATCH 3/7] Update client/services/file.ts Co-authored-by: Matt McCoy <59743922+MattCMcCoy@users.noreply.github.com> --- client/services/file.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/client/services/file.ts b/client/services/file.ts index d21b695..6ed4f6f 100644 --- a/client/services/file.ts +++ b/client/services/file.ts @@ -139,7 +139,6 @@ export const useAllFileByGroup = (groupId: number) => { queryKey: ['getAllFile'] }); - const { data, refetch, isFetching } = queryResult; return { groupFiles, refetchGroupFiles, isFetching }; }; From 686599d4119a3614542a1110ad0e920052c22dcf Mon Sep 17 00:00:00 2001 From: patela22 <39590072+patela22@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:26:36 -0400 Subject: [PATCH 4/7] Update client/services/file.ts Co-authored-by: Matt McCoy <59743922+MattCMcCoy@users.noreply.github.com> --- client/services/file.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/services/file.ts b/client/services/file.ts index 6ed4f6f..3bc78e8 100644 --- a/client/services/file.ts +++ b/client/services/file.ts @@ -136,7 +136,7 @@ export const useFileByGroup = (groupId: number, fileName: string) => { export const useAllFileByGroup = (groupId: number) => { const queryResult = useQuery({ queryFn: () => getAllFile(groupId), - queryKey: ['getAllFile'] + queryKey: ['getAllFile', groupID] }); From 715975d0b9592a8232e601a3f6ae2647d81ab5cf Mon Sep 17 00:00:00 2001 From: patela22 <39590072+patela22@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:26:43 -0400 Subject: [PATCH 5/7] Update client/screens/FileViewScreen.tsx Co-authored-by: Matt McCoy <59743922+MattCMcCoy@users.noreply.github.com> --- client/screens/FileViewScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/screens/FileViewScreen.tsx b/client/screens/FileViewScreen.tsx index 161be2b..411c85a 100644 --- a/client/screens/FileViewScreen.tsx +++ b/client/screens/FileViewScreen.tsx @@ -17,7 +17,7 @@ type RenderItemProps = { item: FileViewProps; }; -function FileViewScreen() { +export default function FileViewScreen() { const { group } = useCareWalletContext(); const { data, refetch, isFetching } = useAllFileByGroup(group.groupID); From 2d589dd0b572cf79251673386d7d49ca1ac1d823 Mon Sep 17 00:00:00 2001 From: patela22 <39590072+patela22@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:26:53 -0400 Subject: [PATCH 6/7] Update client/services/file.ts Co-authored-by: Matt McCoy <59743922+MattCMcCoy@users.noreply.github.com> --- client/services/file.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/services/file.ts b/client/services/file.ts index 3bc78e8..f30b6dd 100644 --- a/client/services/file.ts +++ b/client/services/file.ts @@ -134,7 +134,7 @@ export const useFileByGroup = (groupId: number, fileName: string) => { }; export const useAllFileByGroup = (groupId: number) => { - const queryResult = useQuery({ + const { data, refetch, isFetching } = useQuery({ queryFn: () => getAllFile(groupId), queryKey: ['getAllFile', groupID] }); From 19cdc3d25e26ea00db16a56d73dfd2e16397461a Mon Sep 17 00:00:00 2001 From: patela22 <39590072+patela22@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:27:05 -0400 Subject: [PATCH 7/7] Update client/screens/FileViewScreen.tsx Co-authored-by: Matt McCoy <59743922+MattCMcCoy@users.noreply.github.com> --- client/screens/FileViewScreen.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/client/screens/FileViewScreen.tsx b/client/screens/FileViewScreen.tsx index 411c85a..ed4ae09 100644 --- a/client/screens/FileViewScreen.tsx +++ b/client/screens/FileViewScreen.tsx @@ -56,4 +56,3 @@ export default function FileViewScreen() { ); } -export default FileViewScreen;