From 0bbf10b284490889a56da8ace9d095ffabc34db6 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Fri, 9 Jan 2026 10:13:56 -0300 Subject: [PATCH] Handle fragment when accessing the admin console Closes #45116 Signed-off-by: Pedro Igor --- js/apps/admin-ui/src/App.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/apps/admin-ui/src/App.tsx b/js/apps/admin-ui/src/App.tsx index f2d3a3ccc34d..2c2bebaa7741 100644 --- a/js/apps/admin-ui/src/App.tsx +++ b/js/apps/admin-ui/src/App.tsx @@ -50,12 +50,17 @@ export const App = () => { const [adminClient, setAdminClient] = useState(); useEffect(() => { + const fragment = "#/"; + if (window.location.href.endsWith(fragment)) { + const newPath = window.location.pathname.replace(fragment, ""); + window.history.replaceState(null, "", newPath); + } const init = async () => { const client = await initAdminClient(keycloak, environment); setAdminClient(client); }; init().catch(console.error); - }, []); + }, [environment, keycloak]); if (!adminClient) return ; return (