From 39143525c35975cccdbf86b6773a47e162ae7b60 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sat, 25 Oct 2025 22:18:48 +0200 Subject: [PATCH] Revalidates ISR pages --- web/pages/[username]/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/pages/[username]/index.tsx b/web/pages/[username]/index.tsx index 56f04612..09f92fb3 100644 --- a/web/pages/[username]/index.tsx +++ b/web/pages/[username]/index.tsx @@ -23,23 +23,26 @@ export const getStaticProps: GetStaticProps< UserPageProps, { username: string } > = async (props) => { - console.log('Starting getStaticProps in /[username]') + // console.log('Starting getStaticProps in /[username]') const {username} = props.params! const user = await getUserForStaticProps(db, username) - console.log('getStaticProps', {user}) + console.debug('getStaticProps', {user}) if (!user) { + console.debug('No user') return { props: { notFoundCustomText: 'The profile you are looking for is not on this site... or perhaps you just mistyped?', }, + revalidate: 15, } } if (user.username !== username) { + console.debug('Found a case-insensitive match') // Found a case-insensitive match, redirect to correct casing return { redirect: { @@ -56,6 +59,7 @@ export const getStaticProps: GetStaticProps< user: false, username, }, + revalidate: 15, } } @@ -66,6 +70,7 @@ export const getStaticProps: GetStaticProps< props: { notFoundCustomText: `${user.username} hasn't created a profile yet.`, }, + revalidate: 15, } } // console.debug('profile', profile)