From 053216b89135aff3435c2dd27e1d7d95b790a6f2 Mon Sep 17 00:00:00 2001 From: belle Date: Fri, 14 Jun 2024 09:19:00 -0400 Subject: [PATCH] page --- pages/onboard/gallery/{[page].js => page.js} | 34 ++++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename pages/onboard/gallery/{[page].js => page.js} (60%) 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()