moved the dispatch call to change as to be after the navigation
This commit is contained in:
parent
2c2fda4817
commit
a7ed8ccb21
1 changed files with 11 additions and 11 deletions
|
|
@ -80,7 +80,6 @@ export default function AccessObject(props: Props) {
|
||||||
|
|
||||||
const getAccess = (key: number | string, name: string, url: string, useImitation = false) => {
|
const getAccess = (key: number | string, name: string, url: string, useImitation = false) => {
|
||||||
user.settings.useTeam = false;
|
user.settings.useTeam = false;
|
||||||
dispatch({ key: "as", value: "" });
|
|
||||||
userAPI.updateUser(user.id(), user.protobuf()).then(() => {
|
userAPI.updateUser(user.id(), user.protobuf()).then(() => {
|
||||||
info("Will no longer view as team by default");
|
info("Will no longer view as team by default");
|
||||||
permissionAPI
|
permissionAPI
|
||||||
|
|
@ -98,6 +97,7 @@ export default function AccessObject(props: Props) {
|
||||||
.then((_response: any) => {
|
.then((_response: any) => {
|
||||||
// history.push(url);
|
// history.push(url);
|
||||||
navigate(url)
|
navigate(url)
|
||||||
|
dispatch({ key: "as", value: "" });
|
||||||
close();
|
close();
|
||||||
})
|
})
|
||||||
.catch((_err: any) => {
|
.catch((_err: any) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue