Skip to content

Commit fdb756b

Browse files
committed
Use correct autoconnect component
1 parent 6091360 commit fdb756b

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import { getThirdwebClient } from "@/constants/thirdweb.server";
2-
import { AutoConnect } from "thirdweb/react";
1+
import { TWAutoConnect } from "app/components/autoconnect";
32

43
export default function OnboardingLayout({
54
children,
65
}: { children: React.ReactNode }) {
7-
const thirdwebClient = getThirdwebClient();
8-
96
return (
107
<>
11-
<AutoConnect client={thirdwebClient} />
8+
<TWAutoConnect />
129
{children}
1310
</>
1411
);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
SelectTrigger,
2121
SelectValue,
2222
} from "@/components/ui/select";
23+
import { useDashboardRouter } from "@/lib/DashboardRouter";
2324
import { cn } from "@/lib/utils";
2425
import { useAccount } from "@3rdweb-sdk/react/hooks/useApi";
2526
import { zodResolver } from "@hookform/resolvers/zod";
@@ -29,7 +30,6 @@ import { THIRDWEB_ANALYTICS_API_HOST } from "constants/urls";
2930
import { motion } from "framer-motion";
3031
import { Users2 } from "lucide-react";
3132
import { Building } from "lucide-react";
32-
import { useRouter } from "next/navigation";
3333
import React from "react";
3434
import { useState } from "react";
3535
import {
@@ -165,7 +165,7 @@ export default function OnboardingPage({
165165
const accountQuery = useAccount();
166166
const [step, setStep] = useState(searchParams.email ? 2 : 1);
167167
const [direction, setDirection] = useState(1);
168-
const router = useRouter();
168+
const router = useDashboardRouter();
169169

170170
const form = useForm<FormData>({
171171
resolver: zodResolver(formSchema),
@@ -520,8 +520,8 @@ export default function OnboardingPage({
520520
event.preventDefault(); // Prevent default behavior
521521
const newInterests = isChecked
522522
? checkedInterests.filter(
523-
(key) => key !== interest.key,
524-
)
523+
(key) => key !== interest.key,
524+
)
525525
: [...checkedInterests, interest.key];
526526
form.setValue("interests", newInterests);
527527
}}

0 commit comments

Comments
 (0)