[WEB-4409] refactor: event constants (#7276)

* refactor: event constants

* fix: cycle event keys

* chore: store extension

* chore: update events naming convention

---------

Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
Aaryan Khandelwal 2025-06-27 19:01:00 +05:30 committed by GitHub
parent e09aeab5b8
commit 4a065e14d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 553 additions and 513 deletions

View file

@ -9,7 +9,7 @@ import { Controller, useForm } from "react-hook-form";
// icons
import { CircleCheck } from "lucide-react";
// plane imports
import { FORGOT_PASS_LINK, NAVIGATE_TO_SIGNUP } from "@plane/constants";
import { AUTH_TRACKER_EVENTS } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { Button, Input, TOAST_TYPE, getButtonStyling, setToast } from "@plane/ui";
import { cn, checkEmailValidity } from "@plane/utils";
@ -71,7 +71,7 @@ const ForgotPasswordPage = observer(() => {
email: formData.email,
})
.then(() => {
captureEvent(FORGOT_PASS_LINK, {
captureEvent(AUTH_TRACKER_EVENTS.forgot_password, {
state: "SUCCESS",
});
setToast({
@ -82,7 +82,7 @@ const ForgotPasswordPage = observer(() => {
setResendCodeTimer(30);
})
.catch((err) => {
captureEvent(FORGOT_PASS_LINK, {
captureEvent(AUTH_TRACKER_EVENTS.forgot_password, {
state: "FAILED",
});
setToast({
@ -120,7 +120,7 @@ const ForgotPasswordPage = observer(() => {
{t("auth.common.new_to_plane")}
<Link
href="/"
onClick={() => captureEvent(NAVIGATE_TO_SIGNUP, {})}
onClick={() => captureEvent(AUTH_TRACKER_EVENTS.navigate.sign_up, {})}
className="font-semibold text-custom-primary-100 hover:underline"
>
{t("auth.common.create_account")}