From 9423b205160690a01d247030bebfa125031f1613 Mon Sep 17 00:00:00 2001 From: ismailbenlaredj Date: Mon, 27 Nov 2023 14:44:39 +0100 Subject: [PATCH] fix(fix): fix --- src/pages/item/[id].jsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/pages/item/[id].jsx b/src/pages/item/[id].jsx index 563be94..27dba18 100644 --- a/src/pages/item/[id].jsx +++ b/src/pages/item/[id].jsx @@ -41,12 +41,7 @@ function ItemPage({ item, otherItems }) { ); } -export async function getStaticPaths() { - const paths = [{ params: { id: "ASl4mMHj8pF4ZReIKyKl" } }]; - return { paths, fallback: "blocking" }; -} - -export async function getStaticProps({ params }) { +export async function getServerSideProps({ params }) { let item = await getDocData("items", params.id); item = JSON.parse(JSON.stringify(item)); let otherItems = await getItemByCategory(item.categories); @@ -57,8 +52,6 @@ export async function getStaticProps({ params }) { item, otherItems, }, - - revalidate: 60 * 60, }; }