feat: migrate orgconfig model across the app

This commit is contained in:
swve 2024-08-10 16:53:59 +02:00
parent 6485b6e1bb
commit 28a2456d69
12 changed files with 467 additions and 363 deletions

View file

@ -26,7 +26,7 @@ export function OrgProvider({ children, orgslug }: { children: React.ReactNode,
)
const isOrgActive = useMemo(() => org?.config?.config?.GeneralConfig?.active !== false, [org])
const isOrgActive = useMemo(() => org?.config?.config?.general?.enabled !== false, [org])
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' />