From 32259af266c4528fcc848c2d7149801740ea5bd0 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 4 Oct 2023 18:16:18 -0600 Subject: [PATCH] Adding revalidation for dynamic routes to view new data if requested --- src/pages/[slug].tsx | 1 + src/pages/blog/[slug]/index.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/pages/[slug].tsx b/src/pages/[slug].tsx index fb7d997..72cb374 100644 --- a/src/pages/[slug].tsx +++ b/src/pages/[slug].tsx @@ -27,6 +27,7 @@ export const getStaticProps = wrapper.getStaticProps( props: { page: page.data[0], }, + revalidate: 60, }; } ); diff --git a/src/pages/blog/[slug]/index.tsx b/src/pages/blog/[slug]/index.tsx index dbf564b..06d1aea 100644 --- a/src/pages/blog/[slug]/index.tsx +++ b/src/pages/blog/[slug]/index.tsx @@ -28,6 +28,7 @@ export const getStaticProps = wrapper.getStaticProps( props: { post: post.data[0], }, + revalidate: 60, }; } );