@@ -93,6 +93,15 @@ const CarouselSlider: React.FC = () => {
9393 const isFirstRender = useRef ( true )
9494 const timerRef = useRef < NodeJS . Timeout | null > ( null )
9595
96+ useEffect ( ( ) => {
97+ if ( isFirstRender . current ) {
98+ setTimeout ( ( ) => setIsContentVisible ( true ) , 1000 )
99+ setIsLoading ( false )
100+
101+ isFirstRender . current = false
102+ }
103+ } , [ ] )
104+
96105 useEffect ( ( ) => {
97106 if ( isFirstRender . current ) {
98107 const img = new Image ( )
@@ -159,56 +168,7 @@ const CarouselSlider: React.FC = () => {
159168
160169 { ! isLoading && (
161170 < >
162- < div
163- className = "preview2"
164- style = { {
165- overflow : 'visible' ,
166- position : 'absolute' ,
167- top : '125px' ,
168- marginTop : '-30px' ,
169- left : '0px' ,
170- width : '60px' ,
171- zIndex : '20' ,
172- } }
173- >
174- < div
175- style = { {
176- position : 'absolute' ,
177- top : '125px' ,
178- marginTop : '-30px' ,
179- left : '0px' ,
180- width : '60px' ,
181- zIndex : '20' ,
182- } }
183- className = "z-100 tp-leftarrow tparrows default preview2 hashoveralready"
184- >
185- < div className = "tp-arr-allwrapper" >
186- < div className = "tp-arr-iwrapper" >
187- < div
188- className = "tp-arr-imgholder"
189- style = { {
190- visibility : 'inherit' ,
191- opacity : 1 ,
192- backgroundImage : 'url(/images/bitcoin-advantages.jpg)' ,
193- } }
194- > </ div >
195- < div className = "tp-arr-imgholder2" > </ div >
196- < div className = "tp-arr-titleholder" > Crypto Applications</ div >
197- < div className = "tp-arr-subtitleholder" > </ div >
198- </ div >
199- </ div >
200- </ div >
201- </ div >
202-
203- < button
204- onClick = { ( ) => handleManualSlideChange ( 'prev' ) }
205- disabled = { isAnimating }
206- className = "z-50 absolute left-0 top-1/2 transform -translate-y-1/2 p-2 text-white bg-black bg-opacity-50 hover:bg-opacity-75 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed"
207- >
208- Prev
209- </ button >
210-
211- < div className = "relative w-screen h-[650px] flex items-center bg-black justify-center" >
171+ < div className = "relative w-screen h-[650px] flex items-center bg-black justify-center animate__animated animate__slideInRight" >
212172 < AnimatePresence
213173 initial = { false }
214174 custom = { direction }
@@ -279,13 +239,56 @@ const CarouselSlider: React.FC = () => {
279239 </ AnimatePresence >
280240 </ div >
281241
282- < button
283- onClick = { ( ) => handleManualSlideChange ( 'next' ) }
284- disabled = { isAnimating }
285- className = "z-50 absolute right-0 top-1/2 transform -translate-y-1/2 p-2 text-white bg-black bg-opacity-50 hover:bg-opacity-75 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed"
242+ < div className = "carousel-button z-50 justify-end absolute right-0 top-1/2 transform -translate-y-1/2 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-auto" >
243+ < motion . button
244+ onClick = { ( ) => handleManualSlideChange ( 'next' ) }
245+ disabled = { isAnimating }
246+ className = "flex items-center justify-end overflow-hidden h-12 text-white rounded-r-full shadow-lg"
247+ initial = { { width : 50 } }
248+ whileHover = { { width : 220 } }
249+ transition = { { ease : 'easeOut' , duration : 0.5 } }
250+ >
251+ < motion . span
252+ className = "whitespace-nowrap z-100 w-[150px] py-[11px] absolute"
253+ initial = { { x : 0 , opacity : 0 , right : '20px' } }
254+ whileHover = { { x : 0 , opacity : 1 , right : '0px' } }
255+ transition = { { ease : 'easeOut' , duration : 0.1 , delay : 0 } }
256+ >
257+ Web3.0 Solutions
258+ </ motion . span >
259+ < FontAwesomeIcon
260+ icon = { faChevronRight }
261+ className = "w-5 h-5 mr-[15px] pointer-events-none"
262+ />
263+ </ motion . button >
264+ </ div >
265+
266+ < div
267+ style = { {
268+ position : 'absolute' ,
269+ top : '325px' ,
270+ marginTop : '-30px' ,
271+ left : '0px' ,
272+ width : '60px' ,
273+ } }
274+ className = "tp-leftarrow tparrows default preview2 hashoveralready hidearrows"
286275 >
287- Next
288- </ button >
276+ < div className = "tp-arr-allwrapper" >
277+ < div className = "tp-arr-iwrapper" >
278+ < div
279+ className = "tp-arr-imgholder"
280+ style = { {
281+ visibility : 'inherit' ,
282+ opacity : 1 ,
283+ backgroundImage : 'url("/images/hero-slides/slide-2-macbook.webp")' ,
284+ } }
285+ > </ div >
286+ < div className = "tp-arr-imgholder2" > </ div >
287+ < div className = "tp-arr-titleholder" > Mobile Applications</ div >
288+ < div className = "tp-arr-subtitleholder" > </ div >
289+ </ div >
290+ </ div >
291+ </ div >
289292 </ >
290293 ) }
291294 </ div >
0 commit comments