Skip to content

Commit 5c027b5

Browse files
committed
codeRabbit suggestions
1 parent 802d1b0 commit 5c027b5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

public/app/fn-app/fn-app-provider.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,23 @@ import { FNDashboardProps } from './types';
1717
type FnAppProviderProps = Pick<FNDashboardProps, 'fnError'>;
1818

1919
export const FnAppProvider: FC<PropsWithChildren<FnAppProviderProps>> = (props) => {
20-
const { children, fnError = null } = props;
20+
const { children } = props;
2121

2222
const [ready, setReady] = useState(false);
2323
navigationLogger('AppWrapper', false, 'rendering');
2424
useEffect(() => {
2525
loadAndInitAngularIfEnabled()
2626
.then(() => {
2727
setReady(true);
28-
// $('.preloader').remove();
2928
})
3029
.catch((err) => console.error(err));
3130
return () => {};
3231
}, []);
3332

34-
if (!ready) {
33+
if (!store || !ready) {
3534
return <FnLoader />;
3635
}
3736

38-
if (!store) {
39-
return <>{fnError}</>;
40-
}
41-
4237
return (
4338
<Provider store={store}>
4439
<BrowserRouter>

0 commit comments

Comments
 (0)