mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 03:49:11 +00:00
fix(picker): on access control violation, do a navigate rather than redirectTo
This commit is contained in:
parent
9921410c9f
commit
2d88c4bf23
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { Redirect, redirectTo } from '@reach/router';
|
import { navigate, Redirect } from '@reach/router';
|
||||||
import { GenericLoadingTemplate } from '@roleypoly/design-system/templates/generic-loading';
|
import { GenericLoadingTemplate } from '@roleypoly/design-system/templates/generic-loading';
|
||||||
import { RolePickerTemplate } from '@roleypoly/design-system/templates/role-picker';
|
import { RolePickerTemplate } from '@roleypoly/design-system/templates/role-picker';
|
||||||
import { ServerSetupTemplate } from '@roleypoly/design-system/templates/server-setup';
|
import { ServerSetupTemplate } from '@roleypoly/design-system/templates/server-setup';
|
||||||
|
@ -32,7 +32,7 @@ const Picker = (props: PickerProps) => {
|
||||||
const data = await getFullGuild(props.serverID);
|
const data = await getFullGuild(props.serverID);
|
||||||
|
|
||||||
if (data === false) {
|
if (data === false) {
|
||||||
redirectTo('/error/accessControlViolation');
|
navigate('/error/accessControlViolation');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue