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 +

+
+
+ ); + } + if (status === 2) { + return ( +
+
+
+

User ID: {uid}

+

Activation Token: {token}

+

Invalid Activation Link

+
+
+ ); + } return (
-

User ID: {uid}

-

Activation Token: {token}

-

{activationStatus}

+

User ID: {uid}

+

Activation Token: {token}

+

Activating...

); diff --git a/src/styles.tsx b/src/styles.tsx index 970e2b6..9489746 100644 --- a/src/styles.tsx +++ b/src/styles.tsx @@ -122,7 +122,12 @@ const styles: { [key: string]: React.CSSProperties } = { fontWeight: "bold", textAlign: "center", }, - + text_small_green: { + color: "#0dbc6a", + fontSize: "2vh", + fontWeight: "bold", + textAlign: "center", + }, text_medium: { color: "white", fontSize: "4vh",