Merged in fix/SW-2679-tracking-signup-details-forms (pull request #2236)
feat(SW-2679): Added form tracking for checkout and signup * feat(SW-2679): Added form tracking for checkout and signup * fix(SW-2679): fixes from review Approved-by: Michael Zetterberg
This commit is contained in:
@@ -24,6 +24,7 @@ import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
import { toast } from "@/components/TempDesignSystem/Toasts"
|
||||
import { useFormTracking } from "@/components/TrackingSDK/hooks"
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
import { type SignUpSchema, signUpSchema } from "./schema"
|
||||
@@ -99,6 +100,10 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
shouldFocusError: true,
|
||||
})
|
||||
|
||||
const { control, subscribe } = methods
|
||||
|
||||
useFormTracking("signup", subscribe, control)
|
||||
|
||||
async function onSubmit(data: SignUpSchema) {
|
||||
signup.mutate({ ...data, language: lang })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user