fix: redirection immédiate vers team.html via meta refresh et script inline
- Utilise meta http-equiv=refresh pour rediriger même sans JS - Ajoute script inline dans Head pour redirection JS immédiate - Fonctionne avec l'export statique Next.js
This commit is contained in:
@@ -1,19 +1,15 @@
|
||||
// @ts-nocheck
|
||||
import { useEffect, useState } from 'react';
|
||||
import Head from 'next/head';
|
||||
|
||||
export default function TeamPage() {
|
||||
const [mounted, setMounted] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setMounted(true);
|
||||
// Rediriger vers team.html qui contient les vraies visualisations
|
||||
if (typeof window !== 'undefined') {
|
||||
window.location.href = '/team.html';
|
||||
}
|
||||
}, []);
|
||||
|
||||
if (!mounted) {
|
||||
return (
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<meta httpEquiv="refresh" content="0;url=/team.html" />
|
||||
<script dangerouslySetInnerHTML={{
|
||||
__html: `window.location.replace('/team.html');`
|
||||
}} />
|
||||
</Head>
|
||||
<div
|
||||
style={{
|
||||
width: '100vw',
|
||||
@@ -29,11 +25,9 @@ export default function TeamPage() {
|
||||
}}
|
||||
>
|
||||
<div style={{ color: 'white', fontSize: '18px' }}>
|
||||
Chargement des visualisations équipe...
|
||||
Redirection vers les visualisations équipe...
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user