Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: add loading screen for user context

Sheen Capadnganbd9c9ea1f45b
diff --git a/frontend/src/context/UserContext/UserContext.tsx b/frontend/src/context/UserContext/UserContext.tsx
index 433fc39597..0e23ccb7cf 100644
--- a/frontend/src/context/UserContext/UserContext.tsx
+++ b/frontend/src/context/UserContext/UserContext.tsx
@@ -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>;
};