diff --git a/src/app/[netname]/page.tsx b/src/app/[netname]/page.tsx index 3242420a..03596090 100644 --- a/src/app/[netname]/page.tsx +++ b/src/app/[netname]/page.tsx @@ -1,9 +1,9 @@ 'use client'; -import * as React from 'react'; +import React from 'react'; +import { ToastContainer } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; -import { ToastContainer } from 'react-toastify'; import ContentHome from '@/components/layout/ContentHome'; import CreateBounty from '@/components/ui/CreateBounty'; diff --git a/src/components/layout/ContentHome.tsx b/src/components/layout/ContentHome.tsx index 3a7413a1..480816cd 100644 --- a/src/components/layout/ContentHome.tsx +++ b/src/components/layout/ContentHome.tsx @@ -1,10 +1,10 @@ 'use-client'; -import { useDynamicContext } from '@dynamic-labs/sdk-react-core'; import { usePathname } from 'next/navigation'; import { useEffect, useState } from 'react'; -import { useGetChain } from '@/hooks'; + import { cn } from '@/lib'; +import { useGetChain } from '@/hooks'; import { BountyList } from '@/components/ui'; import { fetchBounties, getContractRead } from '@/app/context'; import { BlacklistedBounties, PAGE_SIZE } from '@/constant/'; @@ -104,7 +104,7 @@ const ContentHome = () => { const contractRead = await getContractRead(); const bountyCounter = await contractRead.bountyCounter(); const totalBounties = Number(bountyCounter.toString()); - const data = await fetchBounties(-PAGE_SIZE, PAGE_SIZE); + const data = await fetchBounties(totalBounties - PAGE_SIZE, PAGE_SIZE); setBountiesData( data.sort((a, b) => Number(b.createdAt) - Number(a.createdAt))