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
+9 -1
View File
@@ -25,7 +25,15 @@ export default function RegContainer() {
return (
<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">
{tokenIsValid ? <Outlet context={{ token }} /> : <ExpiredTip />}
{magic_token ? (
tokenIsValid ? (
<Outlet context={{ token }} />
) : (
<ExpiredTip />
)
) : (
<Outlet context={{ token }} />
)}
</div>
</div>
);