mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 03:46:10 +00:00
Fix : Do not render the slack chat component directly as child of router switch (#9166)
This commit is contained in:
parent
d2fdb47f22
commit
24ff5562db
@ -137,42 +137,48 @@ const AppRouter = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Switch>
|
<>
|
||||||
{slackChat}
|
{slackChat}
|
||||||
<Route exact component={SigninPage} path={ROUTES.SIGNIN} />
|
<Switch>
|
||||||
{callbackComponent ? (
|
<Route exact component={SigninPage} path={ROUTES.SIGNIN} />
|
||||||
<Route component={callbackComponent} path={ROUTES.CALLBACK} />
|
{callbackComponent ? (
|
||||||
) : null}
|
<Route component={callbackComponent} path={ROUTES.CALLBACK} />
|
||||||
|
) : null}
|
||||||
|
|
||||||
<Route exact path={ROUTES.HOME}>
|
<Route exact path={ROUTES.HOME}>
|
||||||
{!isAuthenticated && !isSigningIn ? (
|
{!isAuthenticated && !isSigningIn ? (
|
||||||
|
<>
|
||||||
|
<Redirect to={ROUTES.SIGNIN} />
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<Redirect to={ROUTES.MY_DATA} />
|
||||||
|
)}
|
||||||
|
</Route>
|
||||||
|
|
||||||
|
{isBasicAuthProvider && (
|
||||||
<>
|
<>
|
||||||
<Redirect to={ROUTES.SIGNIN} />
|
<Route exact component={BasicSignupPage} path={ROUTES.REGISTER} />
|
||||||
|
<Route
|
||||||
|
exact
|
||||||
|
component={ForgotPassword}
|
||||||
|
path={ROUTES.FORGOT_PASSWORD}
|
||||||
|
/>
|
||||||
|
<Route
|
||||||
|
exact
|
||||||
|
component={ResetPassword}
|
||||||
|
path={ROUTES.RESET_PASSWORD}
|
||||||
|
/>
|
||||||
|
<Route
|
||||||
|
exact
|
||||||
|
component={AccountActivationConfirmation}
|
||||||
|
path={ROUTES.ACCOUNT_ACTIVATION}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
) : (
|
|
||||||
<Redirect to={ROUTES.MY_DATA} />
|
|
||||||
)}
|
)}
|
||||||
</Route>
|
{isAuthenticated && <AuthenticatedAppRouter />}
|
||||||
|
<Route exact component={PageNotFound} path={ROUTES.NOT_FOUND} />
|
||||||
{isBasicAuthProvider && (
|
</Switch>
|
||||||
<>
|
</>
|
||||||
<Route exact component={BasicSignupPage} path={ROUTES.REGISTER} />
|
|
||||||
<Route
|
|
||||||
exact
|
|
||||||
component={ForgotPassword}
|
|
||||||
path={ROUTES.FORGOT_PASSWORD}
|
|
||||||
/>
|
|
||||||
<Route exact component={ResetPassword} path={ROUTES.RESET_PASSWORD} />
|
|
||||||
<Route
|
|
||||||
exact
|
|
||||||
component={AccountActivationConfirmation}
|
|
||||||
path={ROUTES.ACCOUNT_ACTIVATION}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{isAuthenticated && <AuthenticatedAppRouter />}
|
|
||||||
<Route exact component={PageNotFound} path={ROUTES.NOT_FOUND} />
|
|
||||||
</Switch>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user