Skip to content

Commit

Permalink
feat: Ajout d'un bouton pour la gestion des préférences de consenteme…
Browse files Browse the repository at this point in the history
…nt dans le pied de page
  • Loading branch information
remillc committed Aug 26, 2024
1 parent ff2cc88 commit 6dd0f35
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/components/Footer/UdeMFooterNote.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ export function UdeMFooterNote() {
Paramètres des témoins
</FooterLink>
</NoteCell>
<NoteCell>
<FooterLink component="bib-consent-preferences-btn" sx={{ textDecoration: 'none' }}>
Paramètres des témoins
</FooterLink>
</NoteCell>
<NoteCell>
<FooterLink to="#">Accessibilité</FooterLink>
</NoteCell>
Expand Down
6 changes: 4 additions & 2 deletions src/components/Link.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const Link = forwardRef(function Link(props, ref) {
// Tailor the following test to your environment.
// This example assumes that any internal link (intended for Gatsby)
// will start with exactly one slash, and that anything else is external.
const external = /^(?:https?:)?\/\//.test(to)
const isExternal = /^(?:https?:)?\/\//.test(to)

// Use Gatsby Link for internal links, and <a> for others
if (external) {
if (isExternal) {
return (
<StyledA ref={ref} href={to} {...other}>
{children}
Expand All @@ -33,4 +33,6 @@ const Link = forwardRef(function Link(props, ref) {
)
})

Link.muiName = MuiLink.muiName

export default Link
1 change: 1 addition & 0 deletions src/templates/PageTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export function Head({ pageContext, location }) {
<script type="module" src="https://cdn.jsdelivr.net/gh/bibudem/ui@0/dist/bib-retroaction-usager.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/gh/bibudem/ui@0/dist/udem-urgence.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/gh/bibudem/ui@0/dist/bib-consent.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/gh/bibudem/ui@0/dist/bib-consent-preferences-btn.js"></script>
</>
)
}

0 comments on commit 6dd0f35

Please sign in to comment.