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 (