doc update : Updated the redirect path if user is not found (#22531)

Updated the redirect path if user is not found

Because the redirect path was `/` when I logged out and then went to something like `localhost:3000/` , this cause an infinite redirect loop and caused the app to break.

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
This commit is contained in:
abhishekmgandCharis authored and GitHub committed 2024-04-09 14:09:39 +00:00
1 parent 31a8add418
commit b2fd97c36f
1 file changed
+1 -1
@@ -495,7 +495,7 @@ export default async function PrivatePage() {
const { data, error } = await supabase.auth.getUser()
if (error || !data?.user) {
redirect('/')
redirect('/login')
}
return <p>Hello {data.user.email}</p>