Skip to content

Commit

Permalink
chore: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
camewell071 committed Jan 12, 2024
1 parent 5c4d008 commit d7fef7b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
24 changes: 22 additions & 2 deletions src/modules/landing/Componets/Hero/Content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className={s.heroContent}>
{mobileScreen ? (
Expand Down Expand Up @@ -66,14 +86,14 @@ export default function HeroContent() {
</Fade>
<Fade>
<li className={s.heroContent_itemSub}>
5,321&nbsp;
{formatCurrency(count, 0, 0)}&nbsp;
<span className={s.heroContent_itemSub_hightLight}>
people are on the allowlist
</span>
</li>
</Fade>
</ul>
<Fade delay={0.7}></Fade>
<Fade delay={0.7}/>
</HStack>
</div>
);
Expand Down
1 change: 0 additions & 1 deletion src/services/http-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const createAxiosInstance = ({ baseURL = '' }: { baseURL: string }) => {
instance.interceptors.request.use(
(config) => {
const token = AuthenStorage.getAuthenKey();
console.log('SANG TEST: ', token);
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
Expand Down

0 comments on commit d7fef7b

Please sign in to comment.