diff --git a/src/routes/EmailVerify.svelte b/src/routes/EmailVerify.svelte
index bd92406..429154b 100644
--- a/src/routes/EmailVerify.svelte
+++ b/src/routes/EmailVerify.svelte
@@ -1,3 +1,61 @@
\ No newline at end of file
+ import { navigate } from "svelte-navigator/src/history";
+ import { account, loggedInUser, teams } from "../lib/appwrite";
+ import Header from "../lib/Header.svelte";
+ import { Link } from "svelte-navigator";
+
+ const searchParams = new URLSearchParams(document.location.search);
+
+ let confirmed = false;
+ let alreadyConfirmed = false;
+
+ if (
+ loggedInUser !== null &&
+ searchParams.get("userId") == loggedInUser["$id"]
+ ) {
+ account
+ .updateVerification(
+ searchParams.get("userId"),
+ searchParams.get("secret"),
+ )
+ .then((r) => {
+ console.log(r);
+ confirmed = true;
+ })
+ .catch((r) => {
+ if (r.type == "user_invalid_token") {
+ alreadyConfirmed = true;
+ }
+ });
+ }
+
+
+
+ {#if loggedInUser !== null}
+
+ {/if}
+
+ {#if loggedInUser == null}
+ Please log in to confirm your email address Log in
+ {/if}
+
+ {#if loggedInUser !== null && searchParams.get("userId") !== loggedInUser["$id"]}
+ You can't verify your email for a different account. Please log out and log
+ back into the correct user.
+ {/if}
+
+ {#if confirmed == true}
+ Your email address has been successfully confirmed! Go home
+ {/if}
+
+ {#if alreadyConfirmed == true}
+ This verification link is invalid. You may already used it, or it may have
+ expired. Go home
+ {/if}
+