mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
fix: Make webapp package env variables dynamic
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// @ts-nocheck
|
||||
import React from 'react';
|
||||
import { useApplicationBoot } from '@/components';
|
||||
import { useAuthMetadata } from '@/hooks/query/authentication';
|
||||
|
||||
/**
|
||||
* Private pages provider.
|
||||
@@ -9,7 +10,10 @@ export function PrivatePagesProvider({
|
||||
// #ownProps
|
||||
children,
|
||||
}) {
|
||||
const { isLoading } = useApplicationBoot();
|
||||
const { isLoading: isAppBootLoading } = useApplicationBoot();
|
||||
const { isLoading: isAuthMetaLoading } = useAuthMetadata();
|
||||
|
||||
const isLoading = isAppBootLoading || isAuthMetaLoading;
|
||||
|
||||
return <React.Fragment>{!isLoading ? children : null}</React.Fragment>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user