refactor: check token in reg base entry

This commit is contained in:
Tristan Yang
2023-06-08 18:34:58 +08:00
parent a3f831be88
commit 10ccfc588b
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -45,7 +45,7 @@
"github_logging_in": "GitHub Logging in...", "github_logging_in": "GitHub Logging in...",
"github_cb_tip": "Please close this window and return widget window", "github_cb_tip": "Please close this window and return widget window",
"magic_link_expire": { "magic_link_expire": {
"title": "Magic link expired", "title": "Magic link invalid or expired",
"desc": "Go back to your original VoceChat tab and request a new magic link.", "desc": "Go back to your original VoceChat tab and request a new magic link.",
"desc_close": "You can close this window now." "desc_close": "You can close this window now."
}, },
+9 -1
View File
@@ -25,7 +25,15 @@ export default function RegContainer() {
return ( return (
<div className="flex-center h-screen overflow-x-hidden overflow-y-auto dark:bg-gray-700"> <div className="flex-center h-screen overflow-x-hidden overflow-y-auto dark:bg-gray-700">
<div className="py-8 px-10 shadow-md rounded-xl max-h-[95vh] overflow-y-auto overflow-x-hidden"> <div className="py-8 px-10 shadow-md rounded-xl max-h-[95vh] overflow-y-auto overflow-x-hidden">
{tokenIsValid ? <Outlet context={{ token }} /> : <ExpiredTip />} {magic_token ? (
tokenIsValid ? (
<Outlet context={{ token }} />
) : (
<ExpiredTip />
)
) : (
<Outlet context={{ token }} />
)}
</div> </div>
</div> </div>
); );