Skip to content

Commit

Permalink
Merge pull request #5023 from kobotoolbox/4991-backport-organization-…
Browse files Browse the repository at this point in the history
…not-found

Fix "Could not get data for your organization" when browsing as an anonymous user.
  • Loading branch information
noliveleger authored Jul 22, 2024
2 parents 9ce92ea + a1281db commit 0fcb003
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jsapp/js/account/billingContextProvider.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ import {
OrganizationContext,
useOrganization,
} from 'js/account/organizations/useOrganization.hook';
import sessionStore from 'js/stores/session';

export const BillingContextProvider = (props: {children: ReactNode}) => {
if (!sessionStore.isLoggedIn) {
return <>{props.children}</>;
}
const [organization, reloadOrg, orgStatus] = useOrganization();
const usage = useUsage(organization?.id);
const products = useProducts();
Expand Down

0 comments on commit 0fcb003

Please sign in to comment.