From 9c2fde7f0b07a06e7dd218de1572acbf8ea2a651 Mon Sep 17 00:00:00 2001 From: Guillaume Fay Date: Fri, 17 Nov 2023 10:36:12 +0100 Subject: [PATCH] fix: add charte url to partner card --- components/bases-locales/charte/partner.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/bases-locales/charte/partner.js b/components/bases-locales/charte/partner.js index 00c6a765a..178011d81 100644 --- a/components/bases-locales/charte/partner.js +++ b/components/bases-locales/charte/partner.js @@ -12,6 +12,7 @@ import {getMairie} from '@/lib/api-etablissements-public' import MairieContact from '@/components/mairie/mairie-contact' import ActionButtonNeutral from '@/components/action-button-neutral' +import ButtonLink from '@/components/button-link' const StyledActionButtonNeutral = styled(ActionButtonNeutral)` display: flex; @@ -33,7 +34,7 @@ function Partner({partnerInfos, isCommune}) { const [isDisplay, setIsDisplay] = useState(false) const [mairieContact, setMairieContact] = useState(null) - const {name, link, infos, perimeter, codeCommune, services, testimonyURL, isCompany, picture} = partnerInfos + const {name, link, infos, perimeter, codeCommune, services, testimonyURL, isCompany, picture, charteURL} = partnerInfos const Chevron = isDisplay ? ChevronUp : ChevronDown const getMairieInfos = useCallback(async () => { @@ -104,6 +105,11 @@ function Partner({partnerInfos, isCommune}) { Voir le témoignage )} + {charteURL && ( + + Voir la charte + + )} )} @@ -225,6 +231,7 @@ Partner.propTypes = { perimeter: PropTypes.string, services: PropTypes.array, testimonyURL: PropTypes.string, + charteURL: PropTypes.string, picture: PropTypes.string.isRequired, isCompany: PropTypes.bool }).isRequired,