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ć
2024-09-05 13:39:48 +00:00
committed by GitHub
parent fde2a9b9be
commit 440f598de8
2 changed files with 5 additions and 3 deletions
@@ -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: "",