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
if (!token) {
return {
props: {
...props,
prepopulateFormValues: {
username: preFillusername || null,
email: prefilEmail || null,
},
},
props: JSON.parse(
JSON.stringify({
...props,
prepopulateFormValues: {
username: preFillusername || null,
email: prefilEmail || null,
},
})
),
};
}