Skip to content

Commit

Permalink
Fixed user inputs user name display
Browse files Browse the repository at this point in the history
  • Loading branch information
pepermao committed Jul 5, 2024
1 parent 29144f5 commit 6627491
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Form/FetchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ const FetchInput = ({
}: FetchInputProps) => {
const [treatedValue, setTreatedValue] = useState([]);
const [isLoading, setIsLoading] = useState(false);
const apiFunction =
fieldName === "usersId"
? userApi.getById
: verificationRequestApi.getById;
const userFields = ["usersId", "crossCheckerId", "reviewerId"];
const apiFunction = userFields.includes(fieldName)
? userApi.getById
: verificationRequestApi.getById;

useEffect(() => {
const fetchSelectedContent = async () => {
Expand Down

0 comments on commit 6627491

Please sign in to comment.