mirror of
https://github.com/rio-labs/rio.git
synced 2026-05-20 19:48:54 -05:00
fix redirect in login example
This commit is contained in:
@@ -4,8 +4,6 @@ from typing import * # type: ignore
|
||||
|
||||
import rio
|
||||
|
||||
from .. import components as comps
|
||||
|
||||
# <additional-imports>
|
||||
from .. import data_models
|
||||
|
||||
@@ -23,7 +21,7 @@ def guard(event: rio.GuardEvent) -> str | None:
|
||||
|
||||
except KeyError:
|
||||
# User is not logged in, redirect to the login page
|
||||
return ""
|
||||
return "/"
|
||||
|
||||
# User is logged in, no redirection needed
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user