File tree Expand file tree Collapse file tree 7 files changed +3
-16
lines changed Expand file tree Collapse file tree 7 files changed +3
-16
lines changed Original file line number Diff line number Diff line change 1- import { useState , useEffect } from 'react' ;
1+ import { useState } from 'react' ;
22import Image from 'next/image' ;
33import Nav from './Nav' ;
44import Container from './Container' ;
@@ -18,16 +18,7 @@ export default function Hero({
1818 setTitleIndex ( titleIndex >= dynamicTitles . length - 1 ? 0 : titleIndex + 1 ) ;
1919 } ;
2020
21- useEffect ( ( ) => {
22- const dynamicTitleEl = document . getElementById ( 'dynamicTitle' ) ;
23- if ( dynamicTitleEl . style . opacity === '1' ) {
24- dynamicTitleEl . style . opacity = '0' ;
25- } else {
26- dynamicTitleEl . style . opacity = '1' ;
27- }
28- } , [ titleIndex ] ) ;
29-
30- setTimeout ( handleTitleIndex , 1350 ) ;
21+ setTimeout ( handleTitleIndex , 1550 ) ;
3122
3223 return (
3324 < div
@@ -47,9 +38,7 @@ export default function Hero({
4738 < div className = { styles . header__content__upper } >
4839 < h1 className = { titleClass ? `${ styles [ titleClass ] } ` : '' } >
4940 { title }
50- { dynamicTitles && (
51- < span id = "dynamicTitle" > { dynamicTitles [ titleIndex ] } </ span >
52- ) }
41+ { dynamicTitles && < span > { dynamicTitles [ titleIndex ] } </ span > }
5342 </ h1 >
5443 </ div >
5544 < div className = { styles . header__content__bottom } >
Original file line number Diff line number Diff line change 2727 font-style : italic ;
2828 font-weight : bold ;
2929 line-height : 3.5rem ;
30- opacity : 0 ;
31- @include transition (opacity 1.55s ease-in-out );
3230 @include desktop {
3331 font-size : 4.5rem ;
3432 line-height : 5rem ;
You can’t perform that action at this time.
0 commit comments