diff --git a/Dockerfile.business b/Dockerfile.business
index 383e3ea..e1a700e 100644
--- a/Dockerfile.business
+++ b/Dockerfile.business
@@ -98,36 +98,59 @@ RUN echo "📊 Comptage des fichiers .md dans .techradar/data/radar" && \
# La page Next.js pour le routing, le HTML statique pour garantir l'affichage
RUN mkdir -p .techradar/src/pages && \
cat > .techradar/src/pages/team.tsx << 'EOF'
-import { useEffect } from 'react';
+import { useEffect, useState } from 'react';
export default function TeamPage() {
+ const [loaded, setLoaded] = useState(false);
+
useEffect(() => {
- // Vérification côté client uniquement
- if (typeof window === 'undefined' || typeof document === 'undefined') return;
+ // Petit délai pour laisser Next.js finir son rendu
+ const timer = setTimeout(() => {
+ setLoaded(true);
+ }, 100);
- try {
- console.log('🔄 TEAM PAGE: Chargement iframe équipe');
-
- // Remplacement simple et sécurisé
- document.body.innerHTML = '';
-
- console.log('✅ TEAM PAGE: Iframe chargé avec succès');
- } catch (error) {
- console.error('❌ Erreur chargement iframe:', error);
- }
+ return () => clearTimeout(timer);
}, []);
- // Rendu côté serveur : rien (évite erreurs SSR)
- if (typeof window === 'undefined') {
+ // Rendu direct de l'iframe dans le composant React
+ if (loaded) {
return (
-
-
Chargement de la page Équipe...
-
+
);
}
- // Côté client : rien, useEffect gère tout
- return null;
+ // Pendant le chargement
+ return (
+
+
+ Chargement des visualisations équipe...
+
+
+ );
}
EOF
RUN echo "✅ Page team.tsx créée (version ultra-simplifiée)" && \
diff --git a/public/team-block-script.js b/public/team-block-script.js
index 3630e8c..a5b3339 100644
--- a/public/team-block-script.js
+++ b/public/team-block-script.js
@@ -2,29 +2,35 @@
(function() {
'use strict';
- // BLOQUER ABSOLUMENT TOUTES LES PAGES ÉQUIPE
- if (window.location.pathname === '/team' ||
- window.location.pathname === '/team/' ||
- window.location.pathname.startsWith('/team/') ||
- window.location.href.includes('/team')) {
+ // DÉTECTION PAGE ÉQUIPE
+ var isTeamPage = window.location.pathname === '/team' ||
+ window.location.pathname === '/team/' ||
+ window.location.pathname.startsWith('/team/') ||
+ window.location.href.includes('/team');
+ if (isTeamPage) {
console.log('🚫 BLOQUEUR ÉQUIPE ACTIF - Page équipe détectée');
- // Empêcher tout autre script de s'exécuter
+ // Bloquer les scripts qui interfèrent avec la page équipe
window.__blockTeamPages = true;
- // Bloquer immédiatement tout chargement de script
+ // Permettre quand mĂŞme les scripts essentiels pour la navigation
var originalAppendChild = Element.prototype.appendChild;
Element.prototype.appendChild = function(child) {
- if (child.tagName === 'SCRIPT' && child.src && child.src.includes('strategie-script.js')) {
- console.log('🚫 Script strategie-script.js BLOQUÉ sur page équipe');
- return child; // Ne pas l'ajouter
+ if (child.tagName === 'SCRIPT' && child.src) {
+ // Bloquer seulement strategie-script.js qui cause les problèmes
+ if (child.src.includes('strategie-script.js')) {
+ console.log('🚫 Script strategie-script.js BLOQUÉ sur page équipe');
+ return child; // Ne pas l'ajouter
+ }
+ // Permettre les autres scripts (navigation, etc.)
}
return originalAppendChild.call(this, child);
};
- return; // Arrêt immédiat
+ console.log('✅ Navigation et scripts essentiels autorisés sur page équipe');
+ return;
}
- console.log('✅ Page normale détectée - scripts autorisés');
+ console.log('✅ Page normale détectée - tous scripts autorisés');
})();