Skip to content

Commit

Permalink
Merge pull request #2450 from Infisical/fix/address-client-side-error…
Browse files Browse the repository at this point in the history
…-secret-approval-page

fix: add loading screen for user context
  • Loading branch information
sheensantoscapadngan authored Sep 18, 2024
2 parents 5740d2b + bd9c9ea commit d6b7045
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions frontend/src/context/UserContext/UserContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ export const UserProvider = ({ children }: Props): JSX.Element => {
};
}, [data, isLoading]);

if (isLoading) {
return (
<div className="flex h-screen w-screen items-center justify-center bg-bunker-800">
<img
src="/images/loading/loading.gif"
height={70}
width={120}
decoding="async"
loading="lazy"
alt="infisical loading indicator"
/>
</div>
);
}

return <UserContext.Provider value={value}>{children}</UserContext.Provider>;
};

Expand Down

0 comments on commit d6b7045

Please sign in to comment.