From 94039598d90bc70c205a74fb2733abe3328cbba7 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 26 Jan 2026 11:56:46 +0100 Subject: [PATCH] fix --- apps/frontend/app/page.tsx | 347 +----------------- .../src/components/layout/LandingFooter.tsx | 13 - 2 files changed, 6 insertions(+), 354 deletions(-) diff --git a/apps/frontend/app/page.tsx b/apps/frontend/app/page.tsx index c462147..0ed76bb 100644 --- a/apps/frontend/app/page.tsx +++ b/apps/frontend/app/page.tsx @@ -1,18 +1,14 @@ 'use client'; -import { useEffect, useRef, useState } from 'react'; +import { useRef } from 'react'; import Link from 'next/link'; import Image from 'next/image'; -import { motion, useInView, useScroll, useTransform, AnimatePresence } from 'framer-motion'; +import { motion, useInView, useScroll, useTransform } from 'framer-motion'; import { Ship, - TrendingUp, - Globe, Shield, Zap, BarChart3, - Calculator, - MapPin, Package, Clock, CheckCircle2, @@ -25,46 +21,14 @@ import { Bell, BookOpen, Users, - Building2, Check, X, - ChevronDown, - Briefcase, - Newspaper, - Mail, - Info, } from 'lucide-react'; import { useAuth } from '@/lib/context/auth-context'; +import { LandingHeader, LandingFooter } from '@/components/layout'; export default function LandingPage() { - const [isScrolled, setIsScrolled] = useState(false); - const [isCompanyMenuOpen, setIsCompanyMenuOpen] = useState(false); - const { user, isAuthenticated, loading } = useAuth(); - - const companyMenuItems = [ - { href: '/about', label: 'À propos', icon: Info, description: 'Notre histoire et mission' }, - { href: '/contact', label: 'Contact', icon: Mail, description: 'Nous contacter' }, - { href: '/careers', label: 'Carrières', icon: Briefcase, description: 'Rejoignez-nous' }, - { href: '/blog', label: 'Blog', icon: BookOpen, description: 'Actualités et insights' }, - { href: '/press', label: 'Presse', icon: Newspaper, description: 'Espace presse' }, - ]; - - // Helper function to get user initials - const getUserInitials = () => { - if (!user) return ''; - const firstInitial = user.firstName?.charAt(0)?.toUpperCase() || ''; - const lastInitial = user.lastName?.charAt(0)?.toUpperCase() || ''; - return firstInitial + lastInitial || user.email?.charAt(0)?.toUpperCase() || '?'; - }; - - // Helper function to get full name - const getFullName = () => { - if (!user) return ''; - if (user.firstName && user.lastName) { - return `${user.firstName} ${user.lastName}`; - } - return user.email || ''; - }; + const { user, isAuthenticated } = useAuth(); const heroRef = useRef(null); const featuresRef = useRef(null); @@ -85,14 +49,6 @@ export default function LandingPage() { const { scrollYProgress } = useScroll(); const backgroundY = useTransform(scrollYProgress, [0, 1], ['0%', '50%']); - useEffect(() => { - const handleScroll = () => { - setIsScrolled(window.scrollY > 50); - }; - window.addEventListener('scroll', handleScroll); - return () => window.removeEventListener('scroll', handleScroll); - }, []); - const features = [ { icon: BarChart3, @@ -292,140 +248,7 @@ export default function LandingPage() { return (
- {/* Navigation */} - -
-
- - Xpeditis - -
- - Fonctionnalités - - - Outils - - - Tarifs - - - {/* Menu Entreprise */} -
setIsCompanyMenuOpen(true)} - onMouseLeave={() => setIsCompanyMenuOpen(false)} - > - - - - {isCompanyMenuOpen && ( - -
-
- {companyMenuItems.map((item) => { - const IconComponent = item.icon; - return ( - -
- -
-
-
- {item.label} -
-
- {item.description} -
-
- - ); - })} -
-
-
- )} -
-
- - {/* Affichage conditionnel: connecté vs non connecté */} - {loading ? ( -
- ) : isAuthenticated && user ? ( - - {/* Avatar avec initiales */} -
- {getUserInitials()} -
- {/* Nom de l'utilisateur */} - - {getFullName()} - - {/* Icône dashboard */} - - - ) : ( - <> - - Connexion - - - Commencer Gratuitement - - - )} -
-
-
- + {/* Hero Section */}
@@ -1052,165 +875,7 @@ export default function LandingPage() {
- {/* Footer */} -
-
-
- {/* Company Info */} -
- Xpeditis -

- Xpeditis est la plateforme B2B leader pour le fret maritime en Europe. Nous - connectons les transitaires avec les plus grandes compagnies maritimes mondiales. -

- -
- - {/* Products */} -
-

Produits

-
    -
  • - - Fonctionnalités - -
  • -
  • - - Outils & Calculateurs - -
  • -
  • - - Tarifs - -
  • -
  • - - API Documentation - -
  • -
  • - - Intégrations - -
  • -
-
- - {/* Company */} -
-

Entreprise

-
    -
  • - - À propos - -
  • -
  • - - Contact - -
  • -
  • - - Carrières - -
  • -
  • - - Blog - -
  • -
  • - - Presse - -
  • -
-
- - {/* Legal */} -
-

Légal

-
    -
  • - - Politique de confidentialité - -
  • -
  • - - Conditions générales - -
  • -
  • - - Politique de cookies - -
  • -
  • - - Sécurité - -
  • -
  • - - Conformité RGPD - -
  • -
-
-
- - {/* Bottom Footer */} -
-
-
- © 2025 Xpeditis SAS. Tous droits réservés. -
-
- - - Paris, France - - - - 50+ Pays - -
-
-
-
-
+
); } diff --git a/apps/frontend/src/components/layout/LandingFooter.tsx b/apps/frontend/src/components/layout/LandingFooter.tsx index 7ba7f10..d334279 100644 --- a/apps/frontend/src/components/layout/LandingFooter.tsx +++ b/apps/frontend/src/components/layout/LandingFooter.tsx @@ -63,19 +63,6 @@ export function LandingFooter() { Tarifs -
  • - - API Documentation - -
  • -
  • - - Intégrations - -