@@ -9,22 +9,16 @@ import {
99 useApiKeys ,
1010} from "@3rdweb-sdk/react/hooks/useApi" ;
1111import { useLoggedInUser } from "@3rdweb-sdk/react/hooks/useLoggedInUser" ;
12- import { AppLayout } from "components/app-layouts/app" ;
1312import { SmartWalletsBillingAlert } from "components/settings/ApiKeys/Alerts" ;
1413import { ApiKeysMenu } from "components/settings/ApiKeys/Menu" ;
1514import { NoApiKeys } from "components/settings/ApiKeys/NoApiKeys" ;
1615import { ConnectSDKCard } from "components/shared/ConnectSDKCard" ;
1716import { SmartWallets } from "components/smart-wallets" ;
18- import { getAbsoluteUrl } from "lib/vercel-utils" ;
1917import { CircleAlertIcon } from "lucide-react" ;
20- import { NextSeo } from "next-seo" ;
21- import { useRouter } from "next/router" ;
22- import { PageId } from "page-id" ;
18+ import { useSearchParams } from "next/navigation" ;
2319import { useMemo , useState } from "react" ;
2420import { useActiveWalletChain } from "thirdweb/react" ;
25- import type { ThirdwebNextPage } from "utils/types" ;
26- import { ConnectSidebarLayout } from "../../../app/(dashboard)/dashboard/connect/DashboardConnectLayout" ;
27- import { isOpChainId } from "../../../app/team/[team_slug]/[project_slug]/connect/account-abstraction/isOpChain" ;
21+ import { isOpChainId } from "../../../../team/[team_slug]/[project_slug]/connect/account-abstraction/isOpChain" ;
2822
2923const TRACKING_CATEGORY = "smart-wallet" ;
3024
@@ -33,9 +27,9 @@ export type SmartWalletFormData = {
3327 clientId : string ;
3428} ;
3529
36- const DashboardConnectAccountAbstraction : ThirdwebNextPage = ( ) => {
37- const router = useRouter ( ) ;
38- const defaultClientId = router . query . clientId ?. toString ( ) ;
30+ export default function Page ( ) {
31+ const searchParams = useSearchParams ( ) ;
32+ const defaultClientId = searchParams ?. get ( "clientId" ) ;
3933 const looggedInUserQuery = useLoggedInUser ( ) ;
4034 const keysQuery = useApiKeys ( ) ;
4135 const [ selectedKey_ , setSelectedKey ] = useState < undefined | ApiKey > ( ) ;
@@ -80,32 +74,10 @@ const DashboardConnectAccountAbstraction: ThirdwebNextPage = () => {
8074
8175 const isOpChain = chain ?. id ? isOpChainId ( chain . id ) : false ;
8276
83- const seo = {
84- title : "The Complete Account Abstraction Toolkit | thirdweb" ,
85- desc : "Add account abstraction to your web3 app & unlock powerful features for seamless onboarding, customizable transactions, & maximum security. Get started." ,
86- } ;
87-
8877 const isPending = looggedInUserQuery . isPending || keysQuery . isPending ;
8978
9079 return (
9180 < div className = "flex flex-col gap-10" >
92- < NextSeo
93- title = { seo . title }
94- description = { seo . desc }
95- openGraph = { {
96- title : seo . title ,
97- description : seo . desc ,
98- images : [
99- {
100- url : `${ getAbsoluteUrl ( ) } /assets/og-image/dashboard-wallets-smart-wallet.png` ,
101- width : 1200 ,
102- height : 630 ,
103- alt : seo . title ,
104- } ,
105- ] ,
106- } }
107- />
108-
10981 < div className = "flex flex-col content-start justify-between gap-4 lg:flex-row" >
11082 < div className = "flex flex-col gap-1.5" >
11183 < h1 className = "font-semibold text-2xl tracking-tight lg:text-3xl" >
@@ -181,19 +153,4 @@ const DashboardConnectAccountAbstraction: ThirdwebNextPage = () => {
181153 />
182154 </ div >
183155 ) ;
184- } ;
185-
186- DashboardConnectAccountAbstraction . getLayout = ( page , props ) => (
187- < AppLayout
188- { ...props }
189- pageContainerClassName = "!max-w-full !px-0"
190- mainClassName = "!pt-0"
191- >
192- < ConnectSidebarLayout > { page } </ ConnectSidebarLayout >
193- </ AppLayout >
194- ) ;
195-
196- DashboardConnectAccountAbstraction . pageId =
197- PageId . DashboardConnectAccountAbstraction ;
198-
199- export default DashboardConnectAccountAbstraction ;
156+ }
0 commit comments