feat(dashboard, user): prefill invite email (#9016)

**What**
- store invite email on the JWT invite token
- prefill email in the invite form

---

RESOLVES CC-125
This commit is contained in:
Frane Polić authored and GitHub committed 2024-09-05 13:39:48 +00:00
1 parent fde2a9b9be
commit 440f598de8
2 files changed
+5 -3

No files matched your search

@@ -38,6 +38,7 @@ type DecodedInvite = {
jti: any
exp: string
iat: number
email: string
}
export const Invite = () => {
@@ -185,6 +186,7 @@ const InvalidView = () => {
const CreateView = ({
onSuccess,
token,
invite,
}: {
onSuccess: () => void
token: string
@@ -196,7 +198,7 @@ const CreateView = ({
const form = useForm<z.infer<typeof CreateAccountSchema>>({
resolver: zodResolver(CreateAccountSchema),
defaultValues: {
email: "",
email: invite.email || "",
first_name: "",
last_name: "",
password: "",