LW7: fix dynamic page state update on same page navigation

This commit is contained in:
Francesco Sansalvadore committed 2023-03-09 16:36:19 +01:00
1 parent 4f7c4fac9b
commit 2e25b35709
1 file changed
+2 -1
@@ -27,7 +27,7 @@ const supabaseAdmin = createClient(
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9idWxkYW5ycHRsb2t0eGNmZnZuIiwicm9sZSI6ImFub24iLCJpYXQiOjE2Njk3MjcwMTIsImV4cCI6MTk4NTMwMzAxMn0.SZLqryz_-stF8dgzeVXmzZWPOqdOrBwqJROlFES8v3I'
)
export default function TicketShare({ user, users }: Props) {
export default function UsernamePage({ user, users }: Props) {
const { username, ticketNumber, name, golden, referrals, bg_image_id } = user
const [supabase] = useState(() =>
@@ -140,6 +140,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
bg_image_id,
},
users,
key: username,
},
revalidate: 5,
}