From 5cd3f04f69d96a47d9baa9cbf239fe5c6ec8a662 Mon Sep 17 00:00:00 2001 From: chan Date: Thu, 14 May 2026 11:35:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=94=84=EB=A1=A0=ED=8A=B8=EC=97=94?= =?UTF-8?q?=EB=93=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=ED=99=98=EA=B2=BD=20?= =?UTF-8?q?=EB=9F=B0=ED=83=80=EC=9E=84=20=EC=98=A4=EB=A5=98(getSortIcon=20?= =?UTF-8?q?=EB=88=84=EB=9D=BD)=20=EB=B0=8F=20=ED=83=80=EC=9E=85=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=97=90=EB=9F=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/tenants/routes/TenantListPage.tsx | 15 +++++++++++++-- adminfront/src/features/users/UserListPage.tsx | 11 +++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/adminfront/src/features/tenants/routes/TenantListPage.tsx b/adminfront/src/features/tenants/routes/TenantListPage.tsx index cfc211a6..f5612345 100644 --- a/adminfront/src/features/tenants/routes/TenantListPage.tsx +++ b/adminfront/src/features/tenants/routes/TenantListPage.tsx @@ -4,7 +4,7 @@ import { useQuery, type UseMutationResult, } from "@tanstack/react-query"; -import type { AdminProfile } from "../../../lib/adminApi"; +import type { UserProfileResponse } from "../../../lib/adminApi"; import { useVirtualizer } from "@tanstack/react-virtual"; import type { AxiosError } from "axios"; import { @@ -498,6 +498,17 @@ function TenantListPage() { setSortConfig((current) => toggleSort(current, key)); }; + const getSortIcon = (key: TenantSortKey) => { + if (!sortConfig || sortConfig.key !== key) { + return ; + } + return sortConfig.direction === "asc" ? ( + + ) : ( + + ); + }; + const deletableTenants = React.useMemo( () => allTenants.filter((tenant) => !isSeedTenant(tenant)), [allTenants], @@ -1196,7 +1207,7 @@ const TenantHierarchyView: React.FC<{ { tenantId: string; status: string }, unknown >; - profile: AdminProfile | undefined; + profile: UserProfileResponse | undefined; sortConfig: SortConfig | null; requestSort: (key: TenantSortKey) => void; getSortIcon: (key: TenantSortKey) => React.ReactNode; diff --git a/adminfront/src/features/users/UserListPage.tsx b/adminfront/src/features/users/UserListPage.tsx index dd6840f4..07256af6 100644 --- a/adminfront/src/features/users/UserListPage.tsx +++ b/adminfront/src/features/users/UserListPage.tsx @@ -303,6 +303,17 @@ function UserListPage() { setSortConfig((current) => toggleSort(current, key)); }; + const getSortIcon = (key: UserSortKey) => { + if (!sortConfig || sortConfig.key !== key) { + return ; + } + return sortConfig.direction === "asc" ? ( + + ) : ( + + ); + }; + const total = query.data?.total ?? 0; const totalPages = Math.ceil(total / limit); const canPromoteSuperAdmin = isSuperAdminRole(profile?.role);