feat: add webpush and sadhna tracker
This commit is contained in:
@@ -17,15 +17,17 @@ function VerifyEmailContent() {
|
||||
const params = useSearchParams();
|
||||
const token = params.get("token") ?? "";
|
||||
const { refresh } = useAuth();
|
||||
const [status, setStatus] = useState<"pending" | "ok" | "error">("pending");
|
||||
const [message, setMessage] = useState<string>("");
|
||||
// Seed straight from the token's presence so the missing-token case isn't
|
||||
// a synchronous setState inside the effect below.
|
||||
const [status, setStatus] = useState<"pending" | "ok" | "error">(
|
||||
token ? "pending" : "error",
|
||||
);
|
||||
const [message, setMessage] = useState<string>(
|
||||
token ? "" : "Verification link is missing a token.",
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!token) {
|
||||
setStatus("error");
|
||||
setMessage("Verification link is missing a token.");
|
||||
return;
|
||||
}
|
||||
if (!token) return;
|
||||
void (async () => {
|
||||
try {
|
||||
await auth.verifyEmail(token);
|
||||
|
||||
Reference in New Issue
Block a user