File tree Expand file tree Collapse file tree 6 files changed +21
-16
lines changed Expand file tree Collapse file tree 6 files changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -268,17 +268,17 @@ export interface BillingCredit {
268268
269269interface UseAccountInput {
270270 refetchInterval ?:
271- | number
272- | false
273- | ( (
274- query : Query <
275- Account ,
276- Error ,
277- Account ,
278- readonly [ "account" , string , "me" ]
279- > ,
280- ) => number | false | undefined )
281- | undefined ;
271+ | number
272+ | false
273+ | ( (
274+ query : Query <
275+ Account ,
276+ Error ,
277+ Account ,
278+ readonly [ "account" , string , "me" ]
279+ > ,
280+ ) => number | false | undefined )
281+ | undefined ;
282282}
283283
284284export function useAccount ( { refetchInterval } : UseAccountInput = { } ) {
Original file line number Diff line number Diff line change 11import { AppFooter } from "@/components/blocks/app-footer" ;
2+ import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner" ;
23import { ErrorProvider } from "../../contexts/error-handler" ;
34import { DashboardHeader } from "../components/Header/DashboardHeader" ;
4- import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner" ;
55
66export default function DashboardLayout ( props : { children : React . ReactNode } ) {
77 return (
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import { getTeams } from "@/api/team";
33import { DashboardTypeCookieSetter } from "@/components/DashboardTypeCookieSetter" ;
44import { SidebarLayout } from "@/components/blocks/SidebarLayout" ;
55import { AppFooter } from "@/components/blocks/app-footer" ;
6+ import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner" ;
67import type React from "react" ;
78import { TWAutoConnect } from "../components/autoconnect" ;
89import { AccountHeader } from "./components/AccountHeader" ;
9- import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner" ;
1010
1111export default async function AccountLayout ( props : {
1212 children : React . ReactNode ;
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import PlausibleProvider from "next-plausible";
77import dynamic from "next/dynamic" ;
88import { Inter } from "next/font/google" ;
99import NextTopLoader from "nextjs-toploader" ;
10- import { UnlimitedWalletsBanner } from "../components/notices/AnnouncementBanner" ;
1110import { PostHogProvider } from "./components/root-providers" ;
1211import { AppRouterProviders } from "./providers" ;
1312
Original file line number Diff line number Diff line change @@ -209,6 +209,12 @@ export default function OnboardingPage({
209209
210210 const onSubmit : SubmitHandler < FormData > = async ( data ) => {
211211 setIsLoading ( true ) ;
212+
213+ const account = await accountQuery . refetch ( ) ;
214+ if ( ! account . data ?. id ) {
215+ throw new Error ( "No account found" ) ;
216+ }
217+
212218 const res = await fetch (
213219 `${ THIRDWEB_ANALYTICS_API_HOST } /v1/preferences/account` ,
214220 {
@@ -217,7 +223,7 @@ export default function OnboardingPage({
217223 "Content-Type" : "application/json" ,
218224 } ,
219225 body : JSON . stringify ( {
220- accountId : accountQuery . data ? .id ,
226+ accountId : account . data . id ,
221227 userType : data . userType ,
222228 role : data . role ,
223229 industry : data . industry ,
Original file line number Diff line number Diff line change 11import { DashboardTypeCookieSetter } from "@/components/DashboardTypeCookieSetter" ;
22import { AppFooter } from "@/components/blocks/app-footer" ;
3- import { TWAutoConnect } from "../../components/autoconnect" ;
43import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner" ;
4+ import { TWAutoConnect } from "../../components/autoconnect" ;
55
66export default function RootTeamLayout ( props : {
77 children : React . ReactNode ;
You can’t perform that action at this time.
0 commit comments