diff --git a/src/frontend/src/pages/AdminPage/index.tsx b/src/frontend/src/pages/AdminPage/index.tsx index e52cb863d..fef3cbb39 100644 --- a/src/frontend/src/pages/AdminPage/index.tsx +++ b/src/frontend/src/pages/AdminPage/index.tsx @@ -27,6 +27,7 @@ import ConfirmationModal from "../../modals/ConfirmationModal"; import UserManagementModal from "../../modals/UserManagementModal"; import { UserInputType } from "../../types/components"; import Header from "../../components/headerComponent"; +import { Users } from "../../types/api"; export default function AdminPage() { const [inputValue, setInputValue] = useState(""); @@ -88,7 +89,7 @@ export default function AdminPage() { if (input === "") { setFilterUserList(userList.current); } else { - const filteredList = userList.current.filter((user) => + const filteredList = userList.current.filter((user:Users) => user.username.toLowerCase().includes(input.toLowerCase()) ); setFilterUserList(filteredList); @@ -276,7 +277,7 @@ export default function AdminPage() { {!loadingUsers && ( - {filterUserList.map((user, index) => ( + {filterUserList.map((user:UserInputType, index) => ( diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index aec1f373f..ecb90c8d3 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -266,6 +266,9 @@ export type UserInputType = { password: string; is_active?: boolean; is_superuser?: boolean; + id: string; + create_at: string; + updated_at:string; }; export type ApiKeyType = {