diff --git a/components/home/HomePage.tsx b/components/home/HomePage.tsx index 49639e26..f189a12f 100644 --- a/components/home/HomePage.tsx +++ b/components/home/HomePage.tsx @@ -23,6 +23,7 @@ import HeroStat from './HeroStat' import useMarketsData from '../../hooks/useMarketData' import { useQuery } from '@tanstack/react-query' import { MANGO_DATA_API_URL } from '../../utils/constants' +import Loading from '../shared/Loading' gsap.registerPlugin(MotionPathPlugin) gsap.registerPlugin(ScrollTrigger) @@ -367,33 +368,39 @@ const HomePage = () => { /> - {formattedSpotData.length && formattedPerpData.length ? ( - -
-

{t('markets')}

-

- {t('home:markets-desc')} -

-
- -
-
- {activeMarketTab === 'spot' - ? formattedSpotData.map((data) => ( - - )) - : formattedPerpData.map((data) => ( - - ))} -
+ +
+

{t('markets')}

+

+ {t('home:markets-desc')} +

+
+
- - ) : null} +
+ {!loadingMarketData ? ( + activeMarketTab === 'spot' ? ( + formattedSpotData.map((data) => ( + + )) + ) : ( + formattedPerpData.map((data) => ( + + )) + ) + ) : ( +
+ +
+ )} +
+
+
{ + return ( + + + + + ) +} + +export default Loading