From cb0dafd205fa0adc7f5d16c717b22d5e8a500eb2 Mon Sep 17 00:00:00 2001 From: Daniel Holmes Date: Tue, 27 Dec 2022 16:25:14 +1000 Subject: [PATCH] Fix incorrect name on nextjs router As far as I can tell, the NextRouter only has a `reload` method and not a `refresh` method. This change fixes that. --- .../pages/guides/auth/auth-helpers/nextjs-server-components.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/pages/guides/auth/auth-helpers/nextjs-server-components.mdx b/apps/docs/pages/guides/auth/auth-helpers/nextjs-server-components.mdx index 10fa7f73f31..92c887ebbfc 100644 --- a/apps/docs/pages/guides/auth/auth-helpers/nextjs-server-components.mdx +++ b/apps/docs/pages/guides/auth/auth-helpers/nextjs-server-components.mdx @@ -222,7 +222,7 @@ export default function SupabaseListener({ accessToken }) { useEffect(() => { supabase.auth.onAuthStateChange((event, session) => { if (session?.access_token !== accessToken) { - router.refresh() + router.reload() } }) }, [accessToken])