mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add loading indicator and improve loading screens
This commit is contained in:
parent
866111aa4c
commit
29219391ea
5 changed files with 32 additions and 5 deletions
|
|
@ -30,7 +30,7 @@ export function OrgProvider({ children, orgslug }: { children: React.ReactNode,
|
|||
const isUserPartOfTheOrg = useMemo(() => orgs?.some((userOrg: any) => userOrg.id === org?.id), [orgs, org?.id])
|
||||
|
||||
if (orgError || orgsError) return <ErrorUI message='An error occurred while fetching data' />
|
||||
if (!org || !orgs || !session) return <div>Loading...</div>
|
||||
if (!org || !orgs || !session) return <div></div>
|
||||
if (!isOrgActive) return <ErrorUI message='This organization is no longer active' />
|
||||
if (!isUserPartOfTheOrg && session.status == 'authenticated' && !isAllowedPathname) {
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue