From e74555b004e87a597d17cd7becfb2e60d893a03e Mon Sep 17 00:00:00 2001 From: GarmashAlex Date: Tue, 7 Jan 2025 19:16:19 +0300 Subject: [PATCH] fix: resolve TypeScript errors in gas-station layout --- app/gas-station/layout.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/gas-station/layout.tsx b/app/gas-station/layout.tsx index 1d697805..eb67b1d1 100644 --- a/app/gas-station/layout.tsx +++ b/app/gas-station/layout.tsx @@ -3,9 +3,11 @@ import "@/app/globals.css"; import { DynamicContextProvider, SolanaWalletConnectors, -} from "@/lib/dynamic"; +} from "@dynamic-labs/sdk-react-core"; import { IBM_Plex_Sans } from "next/font/google"; import { GasProviders } from "@/app/providers/GasProviders"; +import React from 'react'; +import type { WalletConnectorEvents } from "@dynamic-labs/sdk-react-core"; const ibmPlexSans = IBM_Plex_Sans({ subsets: ["latin"], @@ -124,7 +126,7 @@ export default function ClientLayout({ ) as HTMLElement; mainContent.style.filter = ""; }, - onWalletAdded: (args) => { + onWalletAdded: (args: WalletConnectorEvents['onWalletAdded']) => { if (args.wallet.key === "backpacksol") { //@ts-ignore window.backpack.connect({ @@ -134,8 +136,8 @@ export default function ClientLayout({ } }, }, - walletsFilter: (wallets) => - wallets.filter((w) => eclipseWallets.includes(w.key)), + walletsFilter: (wallets: any[]) => + wallets.filter((w: { key: string }) => eclipseWallets.includes(w.key)), environmentId: process.env.NEXT_PUBLIC_ENVIRONMENT_ID || "", walletConnectors: [SolanaWalletConnectors], mobileExperience: "redirect",