Fix iframe
parent
0300c817f7
commit
968f61239b
|
@ -1,5 +1,5 @@
|
|||
import { Helmet } from 'react-helmet-async'
|
||||
import { Route, Routes } from 'react-router-dom'
|
||||
import { Route, Routes, useLocation } from 'react-router-dom'
|
||||
|
||||
import Route404 from '@/components/Route404'
|
||||
import useSimulatorsData from '@/hooks/useSimulatorsData'
|
||||
|
@ -26,7 +26,7 @@ export default function Iframes() {
|
|||
s.iframePath && (
|
||||
<Route
|
||||
key={s.iframePath}
|
||||
path={'/' + encodeURI(s.iframePath) + '/*'}
|
||||
path={s.iframePath + '/*'}
|
||||
element={
|
||||
<>
|
||||
<Helmet>
|
||||
|
|
|
@ -279,7 +279,10 @@ export function SimulateurCard({
|
|||
'Lancer le simulateur'
|
||||
)
|
||||
}
|
||||
to={{ pathname: (isIframe && iframePath) || path }}
|
||||
to={{
|
||||
pathname:
|
||||
(isIframe && `/iframes/${encodeURI(iframePath ?? '')}`) || path,
|
||||
}}
|
||||
state={fromGérer ? { fromGérer: true } : { fromSimulateurs: true }}
|
||||
role="link"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue