mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add logging HELP
This commit is contained in:
parent
e2a5271612
commit
96f48db7df
@ -1,4 +1,4 @@
|
||||
import React, { lazy, PropsWithChildren, useEffect } from 'react';
|
||||
import React, { lazy, PropsWithChildren, useEffect, useState } from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
import { PersistGate } from 'redux-persist/integration/react';
|
||||
import { store } from './app/store';
|
||||
@ -37,9 +37,12 @@ export default function Component({
|
||||
token,
|
||||
children,
|
||||
}: Props) {
|
||||
const [ready, setReady] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
console.log('setting OPENAPI.BASE to', apiUrl);
|
||||
if (apiUrl) OpenAPI.BASE = apiUrl;
|
||||
setReady(true);
|
||||
}, [apiUrl]);
|
||||
|
||||
useEffect(() => {
|
||||
@ -48,15 +51,17 @@ export default function Component({
|
||||
|
||||
return (
|
||||
<React.StrictMode>
|
||||
<Provider store={store}>
|
||||
<PersistGate loading={<Loading />} persistor={persistor}>
|
||||
<React.Suspense fallback={<Loading showText />}>
|
||||
<ThemeLocaleProvider>
|
||||
<App options={{ disabledPanels, disabledTabs }}>{children}</App>
|
||||
</ThemeLocaleProvider>
|
||||
</React.Suspense>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
{ready && (
|
||||
<Provider store={store}>
|
||||
<PersistGate loading={<Loading />} persistor={persistor}>
|
||||
<React.Suspense fallback={<Loading showText />}>
|
||||
<ThemeLocaleProvider>
|
||||
<App options={{ disabledPanels, disabledTabs }}>{children}</App>
|
||||
</ThemeLocaleProvider>
|
||||
</React.Suspense>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
)}
|
||||
</React.StrictMode>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user