--- import FooterNavItem from './FooterNavItem.astro' interface Props { class?: String fullPageList: number[] page: number pageLimit: number } const { class: className, fullPageList, page, pageLimit } = Astro.props const pageList: number[][] = [[]] fullPageList.forEach((n) => { pageList[pageList.length - 1].push(n) if (n % pageLimit === 0) pageList.push([]) }) const currentListIndex = pageList.findIndex((l) => l.includes(page)) const currentList = pageList[currentListIndex] ?? [] ---