Skip to content

Commit

Permalink
add loading indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Feb 28, 2024
1 parent 9c0f565 commit fedb40d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import type * as OnyxTypes from '@src/types/onyx';
import * as Policy from '@userActions/Policy';
import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator';

type PolicyForList = {
value: string;
Expand Down Expand Up @@ -111,6 +112,10 @@ function WorkspaceCategoriesPage({policyCategories, route}: WorkspaceCategoriesP
</View>
);

if (policyCategories === undefined) {
return <FullScreenLoadingIndicator />;
}

return (
<AdminPolicyAccessOrNotFoundWrapper policyID={route.params.policyID}>
<PaidPolicyAccessOrNotFoundWrapper policyID={route.params.policyID}>
Expand Down

0 comments on commit fedb40d

Please sign in to comment.