From 99d32fe12d203ed3b7b97ffac89ac674da6bf6df Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 19 Jun 2025 11:33:56 +0530 Subject: [PATCH] show loading in account selection --- gui/src/pages/config/AccountButton.tsx | 27 ++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/gui/src/pages/config/AccountButton.tsx b/gui/src/pages/config/AccountButton.tsx index 06c6beba0..a5c59f889 100644 --- a/gui/src/pages/config/AccountButton.tsx +++ b/gui/src/pages/config/AccountButton.tsx @@ -1,3 +1,4 @@ +import { ArrowPathIcon } from "@heroicons/react/24/outline"; import { UserCircleIcon } from "@heroicons/react/24/solid"; import { isOnPremSession } from "core/control-plane/AuthTypes"; import { @@ -10,11 +11,13 @@ import { Button } from "../../components/ui/Button"; import { useAuth } from "../../context/Auth"; import { selectCurrentOrg } from "../../redux"; import { useAppSelector } from "../../redux/hooks"; +import { cn } from "../../util/cn"; import { ScopeSelect } from "./ScopeSelect"; export function AccountButton() { - const { session, logout, login, organizations } = useAuth(); + const { session, logout, login, organizations, refreshProfiles } = useAuth(); const selectedOrg = useAppSelector(selectCurrentOrg); + const configLoading = useAppSelector((store) => store.config.loading); if (!session) { return ( @@ -58,9 +61,25 @@ export function AccountButton() { {organizations.length > 0 && (