diff --git a/src/routes/reg/ExpiredTip.js b/src/routes/reg/ExpiredTip.js new file mode 100644 index 00000000..e590ba09 --- /dev/null +++ b/src/routes/reg/ExpiredTip.js @@ -0,0 +1,35 @@ +// import React from "react"; +import styled from "styled-components"; +const Styled = styled.div` + display: flex; + flex-direction: column; + align-items: center; + .title { + font-weight: 600; + font-size: 30px; + line-height: 38px; + color: #101828; + margin-bottom: 12px; + } + .desc { + text-align: center; + font-weight: 400; + font-size: 16px; + line-height: 24px; + color: #667085; + &:not(:last-child) { + margin-bottom: 24px; + } + } +`; +export default function ExpiredTip() { + return ( + +
Magic link expired
+

+ Go back to your original Rustchat tab and request a new magic link. +

+

You can close this window now.

+
+ ); +} diff --git a/src/routes/reg/RegWithUsername.js b/src/routes/reg/RegWithUsername.js index a93db9fa..01186ccb 100644 --- a/src/routes/reg/RegWithUsername.js +++ b/src/routes/reg/RegWithUsername.js @@ -13,6 +13,7 @@ import { useCheckInviteTokenValidMutation, } from "../../app/services/auth"; import toast from "react-hot-toast"; +import ExpiredTip from "./ExpiredTip"; export default function RegWithUsername() { const { token } = useParams(); @@ -66,13 +67,8 @@ export default function RegWithUsername() { setUsername(value); }; if (!token) return "no token"; - if (checkingToken) return "checking token valid..."; - if (!isTokenValid) - return ( -
-

Invalided Token!

-
- ); + if (checkingToken) return "checking Magic Link..."; + if (!isTokenValid) return ; return ( <>