No unnessecary pagination

This commit is contained in:
MeowcaTheoRange 2024-04-24 22:33:46 -05:00
parent 2f0b7da130
commit 2512dd0732
4 changed files with 12 additions and 12 deletions

View file

@ -106,9 +106,9 @@ export default async function Home({
<ConditionalNull condition={curPage < curDate}>
<Link href={`?`}>Later</Link>
</ConditionalNull>
{/* <ConditionalNull condition={curPage * 10 < blogs.data.total_posts}> */}
<Link href={`?until=${users.at(-1)?.joined}`}>Earlier</Link>
{/* </ConditionalNull> */}
<ConditionalNull condition={users.length > 20}>
<Link href={`?until=${parseInt(users.at(-1)?.joined || curPage + "") - 1}`}>Earlier</Link>
</ConditionalNull>
</div>
<h2>Apps</h2>
<p>apps stored in the database</p>

View file

@ -129,9 +129,9 @@ export default async function Home({
<ConditionalNull condition={curPage < curDate}>
<Link href={`?`}>Later</Link>
</ConditionalNull>
{/* <ConditionalNull condition={curPage * 10 < blogs.data.total_posts}> */}
<Link href={`?until=${judgements.at(-1)?.published}`}>Earlier</Link>
{/* </ConditionalNull> */}
<ConditionalNull condition={judgements.length > 20}>
<Link href={`?until=${parseInt(judgements.at(-1)?.published || curPage + "") - 1}`}>Earlier</Link>
</ConditionalNull>
</div>
</MainLayout>
)

View file

@ -120,9 +120,9 @@ export default async function Home({
<ConditionalNull condition={curPage < curDate}>
<Link href={`?`}>Later</Link>
</ConditionalNull>
{/* <ConditionalNull condition={curPage * 10 < blogs.data.total_posts}> */}
<Link href={`?until=${content.at(-1)?.submitted}`}>Earlier</Link>
{/* </ConditionalNull> */}
<ConditionalNull condition={content.length > 20}>
<Link href={`?until=${parseInt(content.at(-1)?.submitted || curPage + "") - 1}`}>Earlier</Link>
</ConditionalNull>
</div>
</MainLayout>
)

View file

@ -89,9 +89,9 @@ export default async function Home({
<ConditionalNull condition={curPage < curDate}>
<Link href={`?`}>Later</Link>
</ConditionalNull>
{/* <ConditionalNull condition={curPage * 10 < blogs.data.total_posts}> */}
<Link href={`?until=${jams.at(-1)?.created}`}>Earlier</Link>
{/* </ConditionalNull> */}
<ConditionalNull condition={jams.length > 20}>
<Link href={`?until=${parseInt(jams.at(-1)?.created || curPage + "") - 1}`}>Earlier</Link>
</ConditionalNull>
</div>
</MainLayout>
)