Add prefill with query params

pull/11421/merge^2
Sean Brydon 2023-09-27 18:08:34 +01:00
parent a6bf5287bd
commit d6f18d79f8
1 changed files with 9 additions and 7 deletions

View File

@ -448,13 +448,15 @@ export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
// no token given, treat as a normal signup without verification token // no token given, treat as a normal signup without verification token
if (!token) { if (!token) {
return { return {
props: { props: JSON.parse(
...props, JSON.stringify({
prepopulateFormValues: { ...props,
username: preFillusername || null, prepopulateFormValues: {
email: prefilEmail || null, username: preFillusername || null,
}, email: prefilEmail || null,
}, },
})
),
}; };
} }