mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: Make webapp package env variables dynamic
This commit is contained in:
@@ -20,7 +20,6 @@ import { queryConfig } from '../hooks/query/base';
|
||||
import { EnsureUserEmailVerified } from './Guards/EnsureUserEmailVerified';
|
||||
import { EnsureAuthNotAuthenticated } from './Guards/EnsureAuthNotAuthenticated';
|
||||
import { EnsureUserEmailNotVerified } from './Guards/EnsureUserEmailNotVerified';
|
||||
import { EnsureOneClickDemoAccountEnabled } from '@/containers/OneClickDemo/EnsureOneClickDemoAccountEnabled';
|
||||
|
||||
const EmailConfirmation = LazyLoader({
|
||||
loader: () => import('@/containers/Authentication/EmailConfirmation'),
|
||||
@@ -31,6 +30,7 @@ const RegisterVerify = LazyLoader({
|
||||
const OneClickDemoPage = LazyLoader({
|
||||
loader: () => import('@/containers/OneClickDemo/OneClickDemoPage'),
|
||||
});
|
||||
|
||||
/**
|
||||
* App inner.
|
||||
*/
|
||||
@@ -40,13 +40,7 @@ function AppInsider({ history }) {
|
||||
<DashboardThemeProvider>
|
||||
<Router history={history}>
|
||||
<Switch>
|
||||
<Route path={'/one_click_demo'}>
|
||||
<EnsureOneClickDemoAccountEnabled>
|
||||
<EnsureAuthNotAuthenticated>
|
||||
<OneClickDemoPage />
|
||||
</EnsureAuthNotAuthenticated>
|
||||
</EnsureOneClickDemoAccountEnabled>
|
||||
</Route>
|
||||
<Route path={'/one_click_demo'} children={<OneClickDemoPage />} />
|
||||
<Route path={'/auth/register/verify'}>
|
||||
<EnsureAuthenticated>
|
||||
<EnsureUserEmailNotVerified>
|
||||
|
||||
@@ -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