diff --git a/frontend/src/app/people/page.tsx b/frontend/src/app/people/page.tsx index e0c06d83..898a0903 100644 --- a/frontend/src/app/people/page.tsx +++ b/frontend/src/app/people/page.tsx @@ -24,8 +24,8 @@ export default function PeoplePage() { const employees = useListEmployeesEmployeesGet(); const departments = useListDepartmentsDepartmentsGet(); - const departmentList = departments.data ?? []; - const employeeList = employees.data ?? []; + const departmentList = useMemo(() => departments.data ?? [], [departments.data]); + const employeeList = useMemo(() => employees.data ?? [], [employees.data]); const createEmployee = useCreateEmployeeEmployeesPost({ mutation: {