From d6f18d79f83e3981555539412cfa80078b0aa353 Mon Sep 17 00:00:00 2001 From: Sean Brydon Date: Wed, 27 Sep 2023 18:08:34 +0100 Subject: [PATCH] Add prefill with query params --- apps/web/pages/signup.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/web/pages/signup.tsx b/apps/web/pages/signup.tsx index 2e78e0a255..76f178b292 100644 --- a/apps/web/pages/signup.tsx +++ b/apps/web/pages/signup.tsx @@ -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, + }, + }) + ), }; }