Skip to content

Commit

Permalink
fix: add charte url to partner card
Browse files Browse the repository at this point in the history
  • Loading branch information
MaGOs92 committed Nov 17, 2023
1 parent 60f28be commit 438e374
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions components/bases-locales/charte/partner.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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 () => {
Expand Down Expand Up @@ -100,10 +100,13 @@ function Partner({partnerInfos, isCommune}) {
})}
</div>
{testimonyURL && (
<Link href={partnerInfos.testimonyURL} legacyBehavior>
<a className='temoignage'>Voir le témoignage</a>
<Link href={testimonyURL} legacyBehavior>
<a className='partner-link' target='_blank'>Voir le témoignage</a>
</Link>
)}
{charteURL && <Link href={charteURL} legacyBehavior>
<a className='partner-link' target='_blank'>Voir la charte</a>
</Link>}
</div>
)}

Expand Down Expand Up @@ -208,7 +211,7 @@ function Partner({partnerInfos, isCommune}) {
align-items: center;
}
.temoignage:hover {
.partner-link:hover {
background-color: transparent;
}
`}</style>
Expand All @@ -225,6 +228,7 @@ Partner.propTypes = {
perimeter: PropTypes.string,
services: PropTypes.array,
testimonyURL: PropTypes.string,
charteURL: PropTypes.string,
picture: PropTypes.string.isRequired,
isCompany: PropTypes.bool
}).isRequired,
Expand Down

0 comments on commit 438e374

Please sign in to comment.