Skip to content

Commit

Permalink
hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
imhson committed Sep 5, 2024
1 parent 2b9a8c0 commit 259b3b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/pages/event/pudgy-asia-tour/Mangas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Mangas() {
)
setUseableComic(comic)
}, [latestComic.data])
if (!useableComic?.data?.length) return null
if (!useableComic?.length) return null
return (
<div className='pt-20 pk-container'>
<div className='uppercase text-white text-center w-full drop-shadow-[2px_2px_0px_#000] trailer-font text-[36px] md:text-[64px] leading-[47px] md:leading-[84px] font-black text-stroke'>
Expand All @@ -33,19 +33,19 @@ export default function Mangas() {
<div className='grid grid-cols-[repeat(auto-fill,minmax(150px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(270px,1fr))] gap-4 md:gap-8 w-full'>
{latestComic.loading
? null
: useableComic.data?.length
: useableComic?.length
? useableComic.slice((page - 1) * 12, page * 12).map((data, index) => <Manga key={index} {...data} />)
: null}
</div>
{!!useableComic?.data?.length && (
{!!useableComic?.length && (
<Pagination
shape='rounded'
page={page}
className='[&_.Mui-selected]:!bg-[#FABA77] [&_.Mui-selected]:!text-text-primary [&_.MuiPaginationItem-root:not(.Mui-selected)]:!text-text-quatenary'
onChange={(event: React.ChangeEvent<unknown>, value: number) => {
setPage(value)
}}
count={Math.ceil(useableComic.data?.length / 12)}
count={Math.ceil(useableComic?.length / 12)}
/>
)}
</div>
Expand Down

0 comments on commit 259b3b1

Please sign in to comment.