feat(SW-360): Added test for register user form
This commit is contained in:
committed by
Pontus Dreij
parent
88c343691d
commit
3872664d1d
@@ -48,7 +48,6 @@ export default function Form() {
|
||||
const zipCode = intl.formatMessage({ id: "Zip code" })
|
||||
|
||||
async function handleSubmit(data: RegisterSchema) {
|
||||
console.log("submit", data)
|
||||
const isSuccessResponse = await registerUser(data)
|
||||
if (!isSuccessResponse) {
|
||||
toast.error("Something went wrong!")
|
||||
@@ -66,11 +65,6 @@ export default function Form() {
|
||||
<section className={styles.container}>
|
||||
<FormProvider {...methods}>
|
||||
<form
|
||||
/**
|
||||
* Ignoring since ts doesn't recognize that tRPC
|
||||
* parses FormData before reaching the route
|
||||
* @ts-ignore */
|
||||
action={registerUser}
|
||||
className={styles.form}
|
||||
id="register"
|
||||
onSubmit={methods.handleSubmit(handleSubmit)}
|
||||
|
||||
Reference in New Issue
Block a user