refactor fetched users into single array and replace Image tag with img

This commit is contained in:
Joao Correia
2025-01-31 10:37:14 +00:00
parent f89b42c41c
commit 9de4cba8e8
9 changed files with 88 additions and 111 deletions

View File

@@ -2,16 +2,14 @@ import Option from "@/interfaces/option";
import Select from "../Low/Select";
interface Props {
teachers: Option[];
corporates: Option[];
approvers: Option[];
selects: (Option | null | undefined)[];
placeholder: string;
onSelectChange: (numberOfSelects: number, index: number, value: Option | null) => void;
}
export default function WorkflowStepSelects({
teachers,
corporates,
approvers,
selects,
placeholder,
onSelectChange,
@@ -34,7 +32,7 @@ export default function WorkflowStepSelects({
return (
<div key={index} className="w-[275px]">
<Select
options={[...teachers, ...corporates]}
options={approvers}
value={option}
onChange={(option) => onSelectChange(selects.length, index, option)}
placeholder={placeholder}