From 62ccf2946ef8d09a8f41e63ef890c63cf74f6110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20R=C3=A9millard?= Date: Mon, 13 May 2024 16:53:28 -0400 Subject: [PATCH] feat: Ajout du composant --- src/components/RetroactionUsager.jsx | 23 ----------------------- src/templates/PageTemplate.jsx | 13 ++++++++++--- 2 files changed, 10 insertions(+), 26 deletions(-) delete mode 100644 src/components/RetroactionUsager.jsx diff --git a/src/components/RetroactionUsager.jsx b/src/components/RetroactionUsager.jsx deleted file mode 100644 index 49ba7c4..0000000 --- a/src/components/RetroactionUsager.jsx +++ /dev/null @@ -1,23 +0,0 @@ -import { useEffect } from 'react' -import { Container } from '@mui/material' - -export default function RetroactionUsager({ formId = '20e7ff6aa4aeadadbea8aa877a806bb9' }) { - useEffect(() => { - const script = document.createElement('script') - - script.src = `https://umontreal.libwizard.com/form_loader.php?id=${formId}&noheader=0` - script.async = true - - document.body.appendChild(script) - - return () => { - document.body.removeChild(script) - } - }, []) - - return ( - -
-
- ) -} diff --git a/src/templates/PageTemplate.jsx b/src/templates/PageTemplate.jsx index 69db0c7..20ce875 100644 --- a/src/templates/PageTemplate.jsx +++ b/src/templates/PageTemplate.jsx @@ -5,17 +5,22 @@ import AppBar from '@/components/AppBar' import Footer from '@/components/Footer' import Link from '@/components/Link' import SEO from '@/components/SEO' -import RetroactionUsager from '@/components/RetroactionUsager' const shortcodes = { Link, Accordion, AccordionDetails, AccordionSummary, Button, Box, Divider, Tab, Tabs } // Provide common components here export default function PageTemplate({ children }) { return ( + - {children} - + + {children} + + + + +