From 0454fb515f5926c98e1f3494a0ec3352f1622757 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 6 Dec 2024 19:02:51 +0100 Subject: [PATCH] Fix issue on first load --- remote_frontend/src/App.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remote_frontend/src/App.tsx b/remote_frontend/src/App.tsx index 9d5ebd5..da19d64 100644 --- a/remote_frontend/src/App.tsx +++ b/remote_frontend/src/App.tsx @@ -58,7 +58,8 @@ function AuthenticatedApp(): React.ReactElement { const [rights, setRights] = React.useState(); 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");