Skip to content

Commit 210a296

Browse files
committed
Merge branch 'ian/ftux' of https://github.com/thirdweb-dev/js into ian/ftux
2 parents 5498c59 + 6091360 commit 210a296

File tree

6 files changed

+21
-16
lines changed

6 files changed

+21
-16
lines changed

apps/dashboard/src/@3rdweb-sdk/react/hooks/useApi.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,17 @@ export interface BillingCredit {
268268

269269
interface 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

284284
export function useAccount({ refetchInterval }: UseAccountInput = {}) {

apps/dashboard/src/app/(dashboard)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AppFooter } from "@/components/blocks/app-footer";
2+
import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner";
23
import { ErrorProvider } from "../../contexts/error-handler";
34
import { DashboardHeader } from "../components/Header/DashboardHeader";
4-
import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner";
55

66
export default function DashboardLayout(props: { children: React.ReactNode }) {
77
return (

apps/dashboard/src/app/account/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { getTeams } from "@/api/team";
33
import { DashboardTypeCookieSetter } from "@/components/DashboardTypeCookieSetter";
44
import { SidebarLayout } from "@/components/blocks/SidebarLayout";
55
import { AppFooter } from "@/components/blocks/app-footer";
6+
import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner";
67
import type React from "react";
78
import { TWAutoConnect } from "../components/autoconnect";
89
import { AccountHeader } from "./components/AccountHeader";
9-
import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner";
1010

1111
export default async function AccountLayout(props: {
1212
children: React.ReactNode;

apps/dashboard/src/app/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import PlausibleProvider from "next-plausible";
77
import dynamic from "next/dynamic";
88
import { Inter } from "next/font/google";
99
import NextTopLoader from "nextjs-toploader";
10-
import { UnlimitedWalletsBanner } from "../components/notices/AnnouncementBanner";
1110
import { PostHogProvider } from "./components/root-providers";
1211
import { AppRouterProviders } from "./providers";
1312

apps/dashboard/src/app/onboarding/page.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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,

apps/dashboard/src/app/team/[team_slug]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { DashboardTypeCookieSetter } from "@/components/DashboardTypeCookieSetter";
22
import { AppFooter } from "@/components/blocks/app-footer";
3-
import { TWAutoConnect } from "../../components/autoconnect";
43
import { UnlimitedWalletsBanner } from "components/notices/AnnouncementBanner";
4+
import { TWAutoConnect } from "../../components/autoconnect";
55

66
export default function RootTeamLayout(props: {
77
children: React.ReactNode;

0 commit comments

Comments
 (0)