fix(dashboard): don't prefil invite email while onboarding (#9392)
This commit is contained in:
1 parent
e7bde31bdb
commit
570c1803f2
1 file changed
+4
-1
@@ -175,10 +175,13 @@ const CreateView = ({
|
|||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const [invalid, setInvalid] = useState(false)
|
const [invalid, setInvalid] = useState(false)
|
||||||
|
|
||||||
|
const [params] = useSearchParams()
|
||||||
|
const isFirstRun = params.get("first_run") === "true" // true when the invite page is open during a "create medusa app" run
|
||||||
|
|
||||||
const form = useForm<z.infer<typeof CreateAccountSchema>>({
|
const form = useForm<z.infer<typeof CreateAccountSchema>>({
|
||||||
resolver: zodResolver(CreateAccountSchema),
|
resolver: zodResolver(CreateAccountSchema),
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
email: invite.email || "",
|
email: isFirstRun ? "" : invite.email || "",
|
||||||
first_name: "",
|
first_name: "",
|
||||||
last_name: "",
|
last_name: "",
|
||||||
password: "",
|
password: "",
|
||||||
|
|||||||
Reference in new issue
Block a user