Fix issue on first load
Some checks reported errors
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build was killed

This commit is contained in:
Pierre HUBERT 2024-12-06 19:02:51 +01:00
parent 5bf914d1f2
commit 0454fb515f

View File

@ -58,7 +58,8 @@ function AuthenticatedApp(): React.ReactElement {
const [rights, setRights] = React.useState<Rights | undefined>();
const load = async () => {
setRights(await ServerApi.GetRights());
const rights = await ServerApi.GetRights();
setRights(rights);
if (rights!.groups.length > 0) setTab("group");
else if (rights!.vms.length > 0) setTab("vm");