Skip to content

Commit 3ac4492

Browse files
committed
fix: fix unnecessary request being made when a user isn't a unit member
1 parent b6a22a6 commit 3ac4492

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/ProjectStats/useStorageSubscriptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const useStorageSubscriptions = () => {
1212
const [unit] = useSelectedUnit();
1313

1414
const { data, isLoading, error } = useGetProductsForUnit(unit?.id ?? "", {
15-
query: { enabled: !!unit?.id },
15+
query: { enabled: !!unit?.caller_is_member },
1616
});
1717

1818
const storageSubscriptions = useMemo(() => {

0 commit comments

Comments
 (0)