Skip to content

Commit

Permalink
fix(fix): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ismail-benlaredj committed Nov 27, 2023
1 parent 792f09f commit 9423b20
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/pages/item/[id].jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -57,8 +52,6 @@ export async function getStaticProps({ params }) {
item,
otherItems,
},

revalidate: 60 * 60,
};
}

Expand Down

1 comment on commit 9423b20

@vercel
Copy link

@vercel vercel bot commented on 9423b20 Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.