Skip to content

Commit

Permalink
Merge branch 'feature/aws-file-routes' of https://github.com/Generate…
Browse files Browse the repository at this point in the history
…NU/Care-Wallet into feature/aws-file-routes
  • Loading branch information
patela22 committed Apr 11, 2024
2 parents 8327201 + 19cdc3d commit ac9d351
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions client/screens/FileViewScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type RenderItemProps = {
item: FileViewProps;
};

function FileViewScreen() {
export default function FileViewScreen() {
const { group } = useCareWalletContext();
const { data, refetch, isFetching } = useAllFileByGroup(group.groupID);

Expand Down Expand Up @@ -56,4 +56,3 @@ function FileViewScreen() {
);
}

Check failure on line 58 in client/screens/FileViewScreen.tsx

View workflow job for this annotation

GitHub Actions / Lint (20.x, 1.21.x)

Delete `⏎`
export default FileViewScreen;
9 changes: 4 additions & 5 deletions client/services/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,18 @@ 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 };
};

export const useAllFileByGroup = (groupId: number) => {
const queryResult = useQuery({
const { data, refetch, isFetching } = useQuery({

Check failure on line 128 in client/services/file.ts

View workflow job for this annotation

GitHub Actions / Lint (20.x, 1.21.x)

Delete `·`

Check failure on line 128 in client/services/file.ts

View workflow job for this annotation

GitHub Actions / Lint (20.x, 1.21.x)

'data' is assigned a value but never used

Check failure on line 128 in client/services/file.ts

View workflow job for this annotation

GitHub Actions / Lint (20.x, 1.21.x)

'refetch' is assigned a value but never used
queryFn: () => getAllFile(groupId),
queryKey: ['getAllFile']
queryKey: ['getAllFile', groupID]
});

Check failure on line 131 in client/services/file.ts

View workflow job for this annotation

GitHub Actions / Lint (20.x, 1.21.x)

Delete `⏎`

const { data, refetch, isFetching } = queryResult;

return { data, refetch, isFetching };
return { groupFiles, refetchGroupFiles, isFetching };
};

0 comments on commit ac9d351

Please sign in to comment.