mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:36:44 +00:00
Merge branch 'main' into next
This commit is contained in:
commit
cf08c5c290
@ -139,8 +139,12 @@ export const SettingsMenu: React.FC<{
|
||||
key: 'signout',
|
||||
label: t('Sign out'),
|
||||
onClick: async () => {
|
||||
await api.auth.signOut();
|
||||
navigate(`/signin?redirect=${encodeURIComponent(redirectUrl)}`);
|
||||
const { data } = await api.auth.signOut();
|
||||
if (data?.data?.redirect) {
|
||||
window.location.href = data.data.redirect;
|
||||
} else {
|
||||
navigate(`/signin?redirect=${encodeURIComponent(redirectUrl)}`);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user