diff --git a/CHANGELOG.md b/CHANGELOG.md index e602ff39f..4343c6f17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ changes. ### Changed - Bump CSL version to 13.1.0 [Issue 2169](https://github.com/IntersectMBO/govtool/issues/2169) +- Display supporting links below labels than in same row [Issue 2391](https://github.com/IntersectMBO/govtool/issues/2391) ### Removed diff --git a/govtool/frontend/src/components/molecules/GovernanceActionDetailsCardLinks.tsx b/govtool/frontend/src/components/molecules/GovernanceActionDetailsCardLinks.tsx index e6ee3cdaf..4d37dad7a 100644 --- a/govtool/frontend/src/components/molecules/GovernanceActionDetailsCardLinks.tsx +++ b/govtool/frontend/src/components/molecules/GovernanceActionDetailsCardLinks.tsx @@ -10,10 +10,12 @@ export const GovernanceActionDetailsCardLinks = ({ }: { links?: Reference[]; }) => { - const { isMobile } = useScreenDimension(); + const { screenWidth } = useScreenDimension(); const { t } = useTranslation(); const { openModal } = useModal(); + const isOneLine = screenWidth < 1600; + return ( !!links?.length && ( <> @@ -32,42 +34,37 @@ export const GovernanceActionDetailsCardLinks = ({ > {t("govActions.supportingLinks")} - - {links.map(({ uri, label }) => ( - - {label && ( - - {label} - - )} + {links.map(({ uri, label }) => ( + + {label && ( + {label} + + )} + + @@ -92,8 +89,8 @@ export const GovernanceActionDetailsCardLinks = ({ )} - ))} - + + ))} ) );