fix: jump to the home page after switching roles
This commit is contained in:
parent
b1decb359b
commit
ad2135b4cb
@ -46,7 +46,7 @@ export const SwitchRole = () => {
|
|||||||
onChange={async (roleName) => {
|
onChange={async (roleName) => {
|
||||||
setRoleName(roleName);
|
setRoleName(roleName);
|
||||||
await api.resource('users').setDefaultRole({ values: { roleName } });
|
await api.resource('users').setDefaultRole({ values: { roleName } });
|
||||||
window.location.reload();
|
window.location.href = '/';
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
Loading…
Reference in New Issue
Block a user