diff --git a/src/Routes/Activation/Activation.tsx b/src/Routes/Activation/Activation.tsx index a749f25..02dd175 100644 --- a/src/Routes/Activation/Activation.tsx +++ b/src/Routes/Activation/Activation.tsx @@ -10,25 +10,51 @@ export interface activation { } export default function Activation() { let { uid, token } = useParams(); - const [activationStatus, setStatus] = useState("Activating..."); + const [status, setStatus] = useState(0); async function verify(activation: activation) { let status = await UserActivate(activation); if (status) { - setStatus("Success!"); + setStatus(1); } else { - setStatus("Invalid Activation Link"); + setStatus(2); } } if (uid && token) { verify({ uid, token }); } + if (status === 1) { + return ( +
User ID: {uid}
+Activation Token: {token}
++ Activation Successful. Please login +
+User ID: {uid}
+Activation Token: {token}
+Invalid Activation Link
+User ID: {uid}
-Activation Token: {token}
-{activationStatus}
+User ID: {uid}
+Activation Token: {token}
+Activating...