@@ -2,7 +2,6 @@ import React, { useEffect } from 'react';
22import { Outlet , useLocation } from 'react-router-dom' ;
33import Header from './Header' ;
44import Footer from './Footer' ;
5- import StarBackground from './StarBackground' ;
65
76const Layout : React . FC = ( ) => {
87 const location = useLocation ( ) ;
@@ -12,6 +11,7 @@ const Layout: React.FC = () => {
1211 window . scrollTo ( 0 , 0 ) ;
1312 } , [ location . pathname ] ) ;
1413
14+ // Map of route backgrounds
1515 const bgMap : Record < string , string > = {
1616 '/' : "/lovable-uploads/EMWBack.png" ,
1717 '/about' : "/lovable-uploads/AboutBG.png" ,
@@ -21,23 +21,24 @@ const Layout: React.FC = () => {
2121 '/clubs' : "/lovable-uploads/ClubsBG.png" ,
2222 '/conetworking' : "/lovable-uploads/CoNetWorKingBG.png" ,
2323 } ;
24+
2425 const bgImage = bgMap [ location . pathname ] || "/lovable-uploads/EMWBack.png" ;
2526
2627 return (
2728 < div className = "flex flex-col min-h-screen relative" >
28- { /* Star background effect - also behind content */ }
29+ { /* Dynamic background image */ }
2930 < div
30- className = "fixed inset-0 -z-30 pointer-events-none bg-cover bg-center bg-no-repeat"
31+ className = "fixed inset-0 -z-30 pointer-events-none bg-cover bg-center bg-no-repeat bg-fixed "
3132 style = { { backgroundImage : `url('${ bgImage } ')` } }
3233 />
33- < div className = "fixed inset-0 pointer-events-none" style = { { zIndex : - 20 } } >
34- < StarBackground />
35- </ div >
3634
3735 < Header />
36+
37+ { /* Main content */ }
3838 < main className = "flex-1 relative z-10 pt-16 lg:pt-20" >
3939 < Outlet />
4040 </ main >
41+
4142 < Footer />
4243 </ div >
4344 ) ;
0 commit comments