File tree Expand file tree Collapse file tree 4 files changed +7
-30
lines changed
app/(app)/login/onboarding Expand file tree Collapse file tree 4 files changed +7
-30
lines changed Original file line number Diff line number Diff line change 11import { apiServerProxy } from "@/actions/proxies" ;
22import type { Project } from "@/api/projects" ;
3- import type { Team } from "@/api/team" ;
43import { useMutation , useQuery , useQueryClient } from "@tanstack/react-query" ;
54import { useActiveAccount } from "thirdweb/react" ;
65import { accountKeys , authorizedWallets } from "../cache-keys" ;
@@ -188,7 +187,7 @@ export function useUpdateNotifications() {
188187export const verifyEmailClient = async ( input : ConfirmEmailInput ) => {
189188 type Result = {
190189 error ?: { message : string } ;
191- data : { team : Team ; account : Account } ;
190+ data : { account : Account } ;
192191 } ;
193192
194193 const res = await apiServerProxy < Result > ( {
Original file line number Diff line number Diff line change 11import type { Meta , StoryObj } from "@storybook/react" ;
2- import { newAccountStub , teamStub } from "stories/stubs" ;
2+ import { newAccountStub } from "stories/stubs" ;
33import { storybookLog } from "stories/utils" ;
44import { AccountOnboardingLayout } from "../onboarding-layout" ;
55import { VerifyEmail } from "./VerifyEmail" ;
@@ -60,7 +60,6 @@ function Story(props: {
6060 throw new Error ( "Example error" ) ;
6161 }
6262 return {
63- team : teamStub ( "foo" , "free" ) ,
6463 account : newAccountStub ( ) ,
6564 } ;
6665 } }
Original file line number Diff line number Diff line change 11"use client" ;
2-
3- import type { Team } from "@/api/team" ;
42import { Spinner } from "@/components/ui/Spinner/Spinner" ;
53import { Button } from "@/components/ui/button" ;
64import {
@@ -24,17 +22,11 @@ import {
2422
2523type VerifyEmailProps = {
2624 email : string ;
27- onEmailConfirmed : ( params : {
28- team : Team ;
29- account : Account ;
30- } ) => void ;
25+ onEmailConfirmed : ( params : { account : Account } ) => void ;
3126 onBack : ( ) => void ;
3227 verifyEmail : ( params : {
3328 confirmationToken : string ;
34- } ) => Promise < {
35- team : Team ;
36- account : Account ;
37- } > ;
29+ } ) => Promise < { account : Account } > ;
3830 resendConfirmationEmail : ( ) => Promise < void > ;
3931 trackEvent : ( params : TrackingParams ) => void ;
4032 accountAddress : string ;
Original file line number Diff line number Diff line change 11"use client" ;
2-
3- import type { Team } from "@/api/team" ;
42import type { Account } from "@3rdweb-sdk/react/hooks/useApi" ;
53import type { TrackingParams } from "hooks/analytics/useTrack" ;
64import { useState } from "react" ;
@@ -27,18 +25,12 @@ type AccountOnboardingScreen =
2725 } ;
2826
2927type AccountOnboardingProps = {
30- onComplete : ( param : {
31- team : Team ;
32- account : Account ;
33- } ) => void ;
28+ onComplete : ( param : { account : Account } ) => void ;
3429 accountAddress : string ;
3530 trackEvent : ( params : TrackingParams ) => void ;
3631 verifyEmail : ( params : {
3732 confirmationToken : string ;
38- } ) => Promise < {
39- team : Team ;
40- account : Account ;
41- } > ;
33+ } ) => Promise < { account : Account } > ;
4234 resendEmailConfirmation : ( ) => Promise < void > ;
4335 loginOrSignup : ( input : {
4436 email : string ;
@@ -106,12 +98,7 @@ export function AccountOnboardingUI(props: AccountOnboardingProps) {
10698 verifyEmail = { props . verifyEmail }
10799 resendConfirmationEmail = { props . resendEmailConfirmation }
108100 trackEvent = { props . trackEvent }
109- onEmailConfirmed = { ( data ) => {
110- props . onComplete ( {
111- team : data . team ,
112- account : data . account ,
113- } ) ;
114- } }
101+ onEmailConfirmed = { props . onComplete }
115102 onBack = { ( ) => setScreen ( screen . backScreen ) }
116103 email = { screen . email }
117104 />
You can’t perform that action at this time.
0 commit comments