Skip to content

Commit

Permalink
fix(crach): fix crach bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Jun 14, 2024
1 parent 77faea0 commit addc0e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/api/contribution-api/getNames.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ const NameFromScanr = (id) => {
fetchContributions
);
const fullName =
data?.hits?.hits[0]?._source?.authors.map((author) => author.fullName) ||
data?.hits?.hits[0]?._source?.authors?.map((author) => author?.fullName) ||
[];
const firstName =
data?.hits?.hits[0]?._source?.authors.map((author) => author.firstName) ||
data?.hits?.hits[0]?._source?.authors?.map((author) => author?.firstName) ||
[];

const lastName =
data?.hits?.hits[0]?._source?.authors.map((author) => author.lastName) ||
data?.hits?.hits[0]?._source?.authors?.map((author) => author?.lastName) ||
[];

return { fullName, firstName, lastName, isLoading, isError, refetch };
Expand Down
1 change: 0 additions & 1 deletion src/api/send-mail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function EmailSender({
const scanRUrl = isDevelopment
? `https://scanr-api.dataesr.ovh/${basePath}/${contribution._id}`
: `/api/${basePath}/${contribution._id}`;
console.log(scanRUrl);
const [selectedProfile, setSelectedProfile] = useState("");

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const MessagePreview = ({
)}
</Row>
<Button onClick={handleExportAllClick}>Tout exporter</Button>
<Row>
<Row className="fr-mb-2w">
<Col className="contributorProductionSide">
<ContributorRequests data={data} coloredName={data.name} />
</Col>
Expand Down

0 comments on commit addc0e2

Please sign in to comment.