Skip to content

Commit

Permalink
Merge pull request #1805 from automatisch/AUT-919
Browse files Browse the repository at this point in the history
fix: pass current user id to usePlanAndUsage hook
  • Loading branch information
barinali committed Apr 12, 2024
2 parents 7d2fb8d + 009754c commit 61dc431
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web/src/components/UsageDataInformation/index.ee.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ function Action(props) {
export default function UsageDataInformation() {
const formatMessage = useFormatMessage();
const queryClient = useQueryClient();
const { data } = usePlanAndUsage();
const planAndUsage = data?.data;
const { data: currentUser } = useCurrentUser();
const currentUserId = currentUser?.data?.id;
const { data } = usePlanAndUsage(currentUserId);
const planAndUsage = data?.data;
const trial = useUserTrial();
const subscriptionData = useSubscription();
const subscription = subscriptionData?.data;
Expand Down
1 change: 1 addition & 0 deletions packages/web/src/hooks/usePlanAndUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function usePlanAndUsage(userId) {

return data;
},
enabled: !!userId,
});

return query;
Expand Down

0 comments on commit 61dc431

Please sign in to comment.