{value}
-
- }
- >
-
+ {children}
+
{emoji('🤷')} Plus d'actions dans cette catégorie
)} diff --git a/source/sites/publicodes/AllActions.tsx b/source/sites/publicodes/AllActions.tsx index 114dceb6d2..be91ecadd5 100644 --- a/source/sites/publicodes/AllActions.tsx +++ b/source/sites/publicodes/AllActions.tsx @@ -23,7 +23,7 @@ const thresholds = [ export default ({ actions: rawActions, - bilans, + bilan, rules, focusedAction, focusAction, @@ -60,7 +60,7 @@ export default ({ {...{ actions: thresholdActions, rules, - bilans, + bilan, actionChoices, focusAction, focusedAction, @@ -108,7 +108,7 @@ export default ({ {...{ actions: notRejected.filter((a) => a.value == null), rules, - bilans, + bilan, actionChoices, focusAction, focusedAction, @@ -127,7 +127,7 @@ export default ({ {...{ actions: notRejected.filter((a) => a.value < 0), rules, - bilans, + bilan, actionChoices, focusAction, focusedAction, @@ -140,7 +140,7 @@ export default ({ {...{ actions: rejected, rules, - bilans, + bilan, actionChoices, focusAction, focusedAction, @@ -166,7 +166,7 @@ export default ({ const List = ({ actions, rules, - bilans, + bilan, actionChoices, focusedAction, focusAction, @@ -192,13 +192,9 @@ const List = ({ exit={{ scale: 0.2 }} transition={{ duration: 1 }} css={` - width: 11rem; + width: 12rem; height: 16rem; margin: 0.4rem; - - @media (min-width: 800px) { - width: 12rem; - } `} >
-
- Pendant 2 semaines, les participants doivent venir faire leur - simulation sur ce lien. + Les participants doivent venir faire leur simulation sur ce lien.
)} diff --git a/source/sites/publicodes/conference/LoadingButton.tsx b/source/sites/publicodes/conference/LoadingButton.tsx index 07cc826c0a..24ed4d589f 100644 --- a/source/sites/publicodes/conference/LoadingButton.tsx +++ b/source/sites/publicodes/conference/LoadingButton.tsx @@ -1,6 +1,6 @@ import { motion } from 'framer-motion' import { useState } from 'react' -import { useHistory } from 'react-router' +import { useNavigate } from 'react-router-dom' import useDatabase, { surveysURL } from './useDatabase' const wait = (delay) => new Promise((resolve) => setTimeout(resolve, delay)) @@ -10,7 +10,7 @@ export default ({ mode, URLPath, room }) => { const [clicked, setClicked] = useState(false) const [text, setText] = useState(null) - const history = useHistory() + const navigate = useNavigate() const actionImg = '/images/2714.svg' @@ -27,7 +27,7 @@ export default ({ mode, URLPath, room }) => { setClicked(true) if (mode === 'conférence') { - return setTimeout(() => history.push(URLPath), 3000) + return setTimeout(() => navigate(URLPath), 3000) } const request = await fetch(surveysURL, { method: 'POST', @@ -46,7 +46,7 @@ export default ({ mode, URLPath, room }) => { if (request.status === 409) { setText('Ce sondage existe déjà') return setTimeout(() => { - history.push(URLPath) + navigate(URLPath) }, 3000) } else { setText('Erreur inconnue côté serveur 😥') @@ -59,24 +59,8 @@ export default ({ mode, URLPath, room }) => { setText('Sondage créé') return setTimeout(() => { - history.push(URLPath) + navigate(URLPath) }, 3000) - - /* - creation.then(({ data, error }) => { - if (!error) - return setTimeout(() => { - history.push(URLPath) - }, 2000) - - if (error && error.code === existsCode) { - setText('Sondage éxistant') - setTimeout(() => { - history.push(URLPath) - }, 3000) - } - }) - */ }} css={` display: flex !important; diff --git a/source/sites/publicodes/conference/Survey.tsx b/source/sites/publicodes/conference/Survey.tsx index a37a5b76d1..fa63b15cce 100644 --- a/source/sites/publicodes/conference/Survey.tsx +++ b/source/sites/publicodes/conference/Survey.tsx @@ -2,7 +2,9 @@ import { usePersistingState } from 'Components/utils/persistState' import { useEffect, useState } from 'react' import emoji from 'react-easy-emoji' import { useDispatch, useSelector } from 'react-redux' -import { Redirect, useHistory, useParams } from 'react-router' +import { Redirect, useParams } from 'react-router' +import { useNavigate } from 'react-router-dom' + import { conferenceImg } from '../../../components/SessionBar' import Beta from './Beta' import { ConferenceTitle } from './Conference' @@ -18,6 +20,7 @@ import Meta from '../../../components/utils/Meta' import { useEngine } from 'Components/utils/EngineContext' import { configSelector } from '../../../selectors/simulationSelectors' +import Navigation from '../Navigation' export default () => { const [surveyIds] = usePersistingState('surveyIds', {}) @@ -63,10 +66,11 @@ export default () => { const survey = useSelector((state) => state.survey) const existContext = survey ? !(survey['contextFile'] == null) : false - const history = useHistory() + const navigate = useNavigate() + if (!room || room === '') { - return
-