Fix issue on first load
This commit is contained in:
parent
5bf914d1f2
commit
0454fb515f
@ -58,7 +58,8 @@ function AuthenticatedApp(): React.ReactElement {
|
|||||||
const [rights, setRights] = React.useState<Rights | undefined>();
|
const [rights, setRights] = React.useState<Rights | undefined>();
|
||||||
|
|
||||||
const load = async () => {
|
const load = async () => {
|
||||||
setRights(await ServerApi.GetRights());
|
const rights = await ServerApi.GetRights();
|
||||||
|
setRights(rights);
|
||||||
|
|
||||||
if (rights!.groups.length > 0) setTab("group");
|
if (rights!.groups.length > 0) setTab("group");
|
||||||
else if (rights!.vms.length > 0) setTab("vm");
|
else if (rights!.vms.length > 0) setTab("vm");
|
||||||
|
Loading…
Reference in New Issue
Block a user