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 && \
|
RUN mkdir -p .techradar/src/pages && \
|
||||||
cat > .techradar/src/pages/team.tsx << 'EOF'
|
cat > .techradar/src/pages/team.tsx << 'EOF'
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import { useEffect } from "react";
|
|
||||||
|
|
||||||
const TeamPage = () => {
|
const TeamPage = () => {
|
||||||
useEffect(() => {
|
// Charger directement l'iframe sans redirection ni layout
|
||||||
// Rediriger vers team.html directement pour éviter les problèmes de routing
|
|
||||||
if (typeof window !== 'undefined') {
|
|
||||||
window.location.href = '/team.html';
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Équipe & Technologies - Laplank</title>
|
<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>
|
</Head>
|
||||||
<div style={{ padding: '20px', textAlign: 'center' }}>
|
<div style={{
|
||||||
<p>Redirection vers la page Équipe...</p>
|
width: '100vw',
|
||||||
<p><a href="/team.html">Cliquez ici si la redirection ne fonctionne pas</a></p>
|
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>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Désactiver le layout par défaut pour cette page
|
||||||
|
TeamPage.getLayout = function getLayout(page) {
|
||||||
|
return page;
|
||||||
|
};
|
||||||
|
|
||||||
export default TeamPage;
|
export default TeamPage;
|
||||||
EOF
|
EOF
|
||||||
RUN echo "✅ Page team.tsx créée (redirige vers /team.html)"
|
RUN echo "✅ Page team.tsx créée (redirige vers /team.html)"
|
||||||
|
|||||||
Reference in New Issue
Block a user