From d7fef7bc6591f6b4107f26e1e7fcea4f6397cdd4 Mon Sep 17 00:00:00 2001 From: camewell <130561684+camewell071@users.noreply.github.com> Date: Fri, 12 Jan 2024 18:38:40 +0700 Subject: [PATCH] chore: update code --- .../landing/Componets/Hero/Content/index.tsx | 24 +++++++++++++++++-- src/services/http-client.ts | 1 - 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/modules/landing/Componets/Hero/Content/index.tsx b/src/modules/landing/Componets/Hero/Content/index.tsx index f9e9de9f7..29b9995d9 100644 --- a/src/modules/landing/Componets/Hero/Content/index.tsx +++ b/src/modules/landing/Componets/Hero/Content/index.tsx @@ -6,10 +6,30 @@ import { useRouter } from 'next/navigation'; import Lines from '@/interactive/Lines'; import Fade from '@/interactive/Fade'; import useWindowSize from '@/hooks/useWindowSize'; +import React from 'react'; +import { getTopLeaderBoards } from '@/services/leaderboard'; +import { formatCurrency } from '@/utils/format'; export default function HeroContent() { const { mobileScreen, tabletScreen } = useWindowSize(); const router = useRouter(); + + const [count, setCount] = React.useState(''); + + const getCount = async () => { + try { + const response = await getTopLeaderBoards({ page: 1, limit: 20 }); + setCount(response.count) + } catch (e) { + console.log(e); + } + } + + + React.useEffect(() => { + getCount() + }, []) + return (