Skip to content

Commit

Permalink
feat: display report item on 3 rows
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Aug 12, 2024
1 parent ea37bf5 commit 0bc4a89
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/frontend/src/features/ReportList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ const ReportListItem = ({
const forText = report.applicantName ? uppercaseFirstLetterIf(`pour ${report.applicantName}`, !whereText) : null;
const byText = uppercaseFirstLetterIf(`par ${report.redactedBy ?? report.user?.name ?? ""}`, !whereText && !forText);

const description = [whereText, forText, byText].filter(Boolean).join(" ");

return (
<Flex position="relative" direction="column" w="100%">
<Link
Expand Down Expand Up @@ -228,9 +226,9 @@ const ReportListItem = ({
<styled.span ml={"5px"}>{new Date(report.meetDate).toLocaleDateString()}</styled.span>
) : null}
</Flex>
<styled.div lineClamp={2}>
<styled.span>{description}</styled.span>
</styled.div>
<styled.div nowrap>{whereText}</styled.div>
<styled.div nowrap>{forText}</styled.div>
<styled.div nowrap>{byText}</styled.div>
<styled.div mt="8px">
<ReportBadge status={report.pdf ? "published" : "draft"} />
</styled.div>
Expand Down

0 comments on commit 0bc4a89

Please sign in to comment.