File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
apps/tuk-landing/src/app/(home)/src/components Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 22
33import Image from 'next/image' ;
44import Link from 'next/link' ;
5+ import { useEffect } from 'react' ;
56
67const MainSection = ( ) => {
8+ useEffect ( ( ) => {
9+ const setVh = ( ) => {
10+ document . documentElement . style . setProperty ( '--vh' , `${ window . innerHeight * 0.01 } px` ) ;
11+ } ;
12+
13+ setVh ( ) ;
14+ window . addEventListener ( 'resize' , setVh ) ;
15+ return ( ) => window . removeEventListener ( 'resize' , setVh ) ;
16+ } , [ ] ) ;
717 return (
8- < section id = "thumbnail" className = "fixed left-0 top-0 z-[-1] h-dvh w-full" >
18+ < section
19+ id = "thumbnail"
20+ className = "fixed left-0 top-0 z-[-1] w-full"
21+ style = { { height : 'calc(var(--vh, 1vh) * 100)' } }
22+ >
923 < div className = "absolute inset-0 z-0" >
1024 < Image
1125 src = "/main-bg.jpg"
1226 alt = "Main Background"
13- fill
27+ fill = { false }
1428 priority
1529 quality = { 100 }
16- className = "object-cover object-center opacity-90"
30+ width = { 1440 }
31+ height = { 900 }
32+ className = "size-full object-cover object-center opacity-90"
1733 />
1834 </ div >
1935
You can’t perform that action at this time.
0 commit comments