Handle out of index last-added pages
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
Jorge Vargas 2025-04-10 18:37:24 -06:00
parent eb17632154
commit 88ef4c7060
2 changed files with 2 additions and 6 deletions

View file

@ -17,7 +17,7 @@ fullPageList.forEach((n) => {
})
const currentListIndex = pageList.findIndex((l) => l.includes(page))
const currentList = pageList[currentListIndex]
const currentList = pageList[currentListIndex] ?? []
---
<ul class:list={[className, 'bg-dark mb-0 py-2 justify-center']}>

View file

@ -13,16 +13,12 @@ import DefaultSEO from 'components/DefaultSEO.astro'
import FooterNav from 'components/lastAdded/FooterNav.astro'
const { albums, limitMD, limitXS, ...listProps } = Astro.props
if (albums.length === 0) {
Astro.redirect('/404')
}
---
<DefaultSEO />
<Base>
<div class='flex flex-col w-full'>
<div class='w-full min-h-100vh mx-auto max-w-[1140px]'>
<div class='w-full mx-auto max-w-[1140px] grow-1'>
<div class='px-2 mb-2'>
<h1 class='uppercase font-medium tracking-wide text-5xl drop-shadow-2xl mt-5 mb-2 text-center'>
<slot />