diff --git a/pages/onboard/gallery/[page].js b/pages/onboard/gallery/page.js similarity index 60% rename from pages/onboard/gallery/[page].js rename to pages/onboard/gallery/page.js index 73277c0e..5c88807b 100644 --- a/pages/onboard/gallery/[page].js +++ b/pages/onboard/gallery/page.js @@ -14,23 +14,23 @@ export default function Page({ projects, itemCount, currentPage }) { ) } -export async function getStaticProps(context) { - const currentPage = parseInt(context.params.page) - const allProjects = await getAllOnboardProjects() - const data = allProjects.slice((currentPage - 1) * 10, currentPage * 10) - const projects = [] - for (const project of data) { - projects.push(await getOnboardProject(project.name)) - } - return { - props: { - projects, - itemCount: allProjects.length, - currentPage - }, - revalidate: 120 // 2 minutes - } -} +// export async function getStaticProps(context) { +// const currentPage = parseInt(context.params.page) +// const allProjects = await getAllOnboardProjects() +// const data = allProjects.slice((currentPage - 1) * 10, currentPage * 10) +// const projects = [] +// for (const project of data) { +// projects.push(await getOnboardProject(project.name)) +// } +// return { +// props: { +// projects, +// itemCount: allProjects.length, +// currentPage +// }, +// revalidate: 120 // 2 minutes +// } +// } // export async function getStaticPaths(_context) { // const projectCount = await onboardProjectCount()