@@ -13,12 +13,15 @@ import {
1313 SelectValue ,
1414} from "@/components/ui/select" ;
1515import { cn } from "@/lib/utils" ;
16+ import { useAccount } from "@3rdweb-sdk/react/hooks/useApi" ;
1617import { Checkbox } from "@chakra-ui/react" ;
1718import { FormControl } from "@chakra-ui/react" ;
1819import * as RadioGroupPrimitive from "@radix-ui/react-radio-group" ;
20+ import { THIRDWEB_ANALYTICS_API_HOST } from "constants/urls" ;
1921import { motion } from "framer-motion" ;
2022import { Users2 } from "lucide-react" ;
2123import { Building } from "lucide-react" ;
24+ import { useRouter } from "next/navigation" ;
2225import React from "react" ;
2326import { useState } from "react" ;
2427import {
@@ -27,10 +30,9 @@ import {
2730 type UseFormRegister ,
2831 useForm ,
2932} from "react-hook-form" ;
33+ import { Blobbie } from "thirdweb/react" ;
34+ import { shortenAddress } from "thirdweb/utils" ;
3035import { FormErrorMessage , FormLabel } from "tw-components" ;
31- import { THIRDWEB_ANALYTICS_API_HOST } from "constants/urls" ;
32- import { useAccount } from "@3rdweb-sdk/react/hooks/useApi" ;
33- import { useRouter } from "next/navigation" ;
3436
3537interface FormData {
3638 email : string ;
@@ -65,9 +67,12 @@ const RadioGroupItemButton = React.forwardRef<
6567 ) ;
6668} ) ;
6769
68- export default function OnboardingPage ( ) {
70+ export default function OnboardingPage ( {
71+ searchParams,
72+ } : { searchParams : { address : string ; email : string | undefined } } ) {
6973 const accountQuery = useAccount ( ) ;
70- const [ step , setStep ] = useState ( 1 ) ;
74+ console . log ( searchParams . email ) ;
75+ const [ step , setStep ] = useState ( searchParams . email ? 2 : 1 ) ;
7176 const [ direction , setDirection ] = useState ( 1 ) ;
7277 const router = useRouter ( ) ;
7378
@@ -82,6 +87,7 @@ export default function OnboardingPage() {
8287 } = useForm < FormData > ( {
8388 defaultValues : {
8489 interests : [ ] ,
90+ email : searchParams . email ?? "" ,
8591 } ,
8692 } ) ;
8793
@@ -438,7 +444,7 @@ export default function OnboardingPage() {
438444 } ;
439445
440446 return (
441- < div className = "relative flex h-screen flex-col place-items-center bg-muted/30 md:flex-row" >
447+ < div className = "relative flex flex-col place-items-center bg-muted/30 md:flex-row" >
442448 < main className = "z-10 flex w-full gap-6" >
443449 { /* Left Panel */ }
444450 < div className = "items-between relative box-border flex h-screen w-full flex-col overflow-hidden p-12 lg:w-1/2" >
@@ -470,18 +476,29 @@ export default function OnboardingPage() {
470476 </ div >
471477 { /* Right Panel */ }
472478 < div className = "flex h-screen w-1/2 animate-gradient-x flex-col items-center justify-center bg-gradient-to-r from-[#25369F] via-[#290259] to-[#3E0D45]" >
473- < Card className = "flex w-[275px ] items-center rounded-xl border-muted transition-all " >
479+ < Card className = "flex w-[300px ] items-center rounded-xl border-muted transition-all " >
474480 < CardContent className = "flex items-center space-x-4 p-4" >
475481 { getValues ( "userType" ) ? (
476482 getValues ( "userType" ) === "Developer" ? (
477483 < Users2 className = "size-8" />
478484 ) : (
479485 < Building className = "size-8" />
480486 )
481- ) : null }
487+ ) : (
488+ < div className = "size-7 overflow-hidden rounded-full" >
489+ < Blobbie
490+ address = { accountQuery . data ?. creatorWalletAddress ?? "" }
491+ size = { 28 }
492+ />
493+ </ div >
494+ ) }
482495 < div className = "flex flex-col" >
483496 < h5 className = "font-regular font-sm text-white" >
484- { getValues ( "email" ) ?? "a1...b2" }
497+ { getValues ( "email" )
498+ ? getValues ( "email" )
499+ : accountQuery . data ?. creatorWalletAddress
500+ ? shortenAddress ( accountQuery . data ?. creatorWalletAddress )
501+ : "" }
485502 </ h5 >
486503
487504 < h5
0 commit comments