fix: page /team charge directement l'iframe sans redirection
- Suppression de la redirection vers /team.html - Chargement direct de l'iframe dans la page Next.js - Styles pour masquer le layout par défaut - getLayout retourne la page directement sans layout Cela évite que Next.js charge les données du radar avant l'affichage
This commit is contained in:
@@ -99,30 +99,63 @@ RUN echo "📊 Comptage des fichiers .md dans .techradar/data/radar" && \
|
||||
RUN mkdir -p .techradar/src/pages && \
|
||||
cat > .techradar/src/pages/team.tsx << 'EOF'
|
||||
import Head from "next/head";
|
||||
import { useEffect } from "react";
|
||||
|
||||
const TeamPage = () => {
|
||||
useEffect(() => {
|
||||
// Rediriger vers team.html directement pour éviter les problèmes de routing
|
||||
if (typeof window !== 'undefined') {
|
||||
window.location.href = '/team.html';
|
||||
}
|
||||
}, []);
|
||||
|
||||
// Charger directement l'iframe sans redirection ni layout
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Équipe & Technologies - Laplank</title>
|
||||
<meta httpEquiv="refresh" content="0;url=/team.html" />
|
||||
<style jsx global>{`
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
#__next {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
`}</style>
|
||||
</Head>
|
||||
<div style={{ padding: '20px', textAlign: 'center' }}>
|
||||
<p>Redirection vers la page Équipe...</p>
|
||||
<p><a href="/team.html">Cliquez ici si la redirection ne fonctionne pas</a></p>
|
||||
<div style={{
|
||||
width: '100vw',
|
||||
height: '100vh',
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
overflow: 'hidden',
|
||||
position: 'fixed',
|
||||
top: 0,
|
||||
left: 0,
|
||||
zIndex: 9999,
|
||||
background: '#1a4d3a'
|
||||
}}>
|
||||
<iframe
|
||||
src="/team.html"
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
border: 'none',
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
display: 'block'
|
||||
}}
|
||||
title="Équipe & Technologies"
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
// Désactiver le layout par défaut pour cette page
|
||||
TeamPage.getLayout = function getLayout(page) {
|
||||
return page;
|
||||
};
|
||||
|
||||
export default TeamPage;
|
||||
EOF
|
||||
RUN echo "✅ Page team.tsx créée (redirige vers /team.html)"
|
||||
|
||||
Reference in New Issue
Block a user