Skip to content

Commit

Permalink
Merge pull request #237 from sinamics/invite
Browse files Browse the repository at this point in the history
Bugfix User registration when using invitation link
  • Loading branch information
sinamics authored Dec 12, 2023
2 parents f2c9ecc + 96eb0d9 commit 845e79c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/auth/registerForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ interface FormData {
password: string;
name: string;
ztnetToken?: string;
token: string;
}

const RegisterForm: React.FC = () => {
const router = useRouter();
const { invite } = router.query;
const { invite } = router.query as { invite?: string };

const [loading, setLoading] = useState(false);
const [formData, setFormData] = useState<FormData>({
email: "",
password: "",
name: "",
ztnetToken: "",
token: invite,
});

const { mutate: register } = api.auth.register.useMutation();
Expand Down

0 comments on commit 845e79c

Please sign in to comment.