From bd9c9ea1f45b1e8a847b10e26950fa2a34a513f3 Mon Sep 17 00:00:00 2001 From: Sheen Capadngan Date: Thu, 19 Sep 2024 02:33:03 +0800 Subject: [PATCH] fix: add loading screen for user context --- frontend/src/context/UserContext/UserContext.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/src/context/UserContext/UserContext.tsx b/frontend/src/context/UserContext/UserContext.tsx index 433fc3959..0e23ccb7c 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 ( +
+ infisical loading indicator +
+ ); + } + return {children}; };