From dc8f00c3180a43a9478ad7203093ae7cbc94c0c1 Mon Sep 17 00:00:00 2001 From: Carlos-Mesquita Date: Wed, 6 Nov 2024 20:22:21 +0000 Subject: [PATCH] When merging forgot to place entities as optional and = [] --- .../{BatchCreateUser/index.tsx => Lists/BatchCreateUser.tsx} | 4 ++-- src/pages/settings.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/pages/(admin)/{BatchCreateUser/index.tsx => Lists/BatchCreateUser.tsx} (98%) diff --git a/src/pages/(admin)/BatchCreateUser/index.tsx b/src/pages/(admin)/Lists/BatchCreateUser.tsx similarity index 98% rename from src/pages/(admin)/BatchCreateUser/index.tsx rename to src/pages/(admin)/Lists/BatchCreateUser.tsx index b7c6d264..f753c105 100644 --- a/src/pages/(admin)/BatchCreateUser/index.tsx +++ b/src/pages/(admin)/Lists/BatchCreateUser.tsx @@ -64,11 +64,11 @@ const USER_TYPE_PERMISSIONS: { interface Props { user: User; permissions: PermissionType[]; - entities: EntityWithRoles[] + entities?: EntityWithRoles[] onFinish: () => void; } -export default function BatchCreateUser({ user, entities, permissions, onFinish }: Props) { +export default function BatchCreateUser({ user, entities = [], permissions, onFinish }: Props) { const [infos, setInfos] = useState([]); const [duplicatedUsers, setDuplicatedUsers] = useState([]); diff --git a/src/pages/settings.tsx b/src/pages/settings.tsx index 141c69cf..fa7399b9 100644 --- a/src/pages/settings.tsx +++ b/src/pages/settings.tsx @@ -12,7 +12,7 @@ import Lists from "./(admin)/Lists"; import BatchCodeGenerator from "./(admin)/BatchCodeGenerator"; import { shouldRedirectHome } from "@/utils/navigation.disabled"; import ExamGenerator from "./(admin)/ExamGenerator"; -import BatchCreateUser from "./(admin)/BatchCreateUser"; +import BatchCreateUser from "./(admin)/Lists/BatchCreateUser"; import { checkAccess, getTypesOfUser } from "@/utils/permissions"; import usePermissions from "@/hooks/usePermissions"; import { useState } from "react";