Skip to content

Commit

Permalink
fix: show reports on 2 columns from 6 items
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Aug 12, 2024
1 parent a360696 commit 86784a4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/frontend/src/features/ReportList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ const NoReport = () => {
);
};

const nbPerColumn = 10;

export const ReportList = ({
reports,
page,
Expand All @@ -135,7 +133,7 @@ export const ReportList = ({
}) => {
const error = reports.length === 0 ? <NoReport /> : null;

const columns = chunk(reports, nbPerColumn);
const columns = reports.length < 6 ? [reports] : chunk(reports, Math.ceil(reports.length / 2));

return (
<Stack w="100%" mt={{ base: "20px", lg: "30px" }}>
Expand Down

0 comments on commit 86784a4

Please sign in to comment.