diff --git a/app/(general)/layout.tsx b/app/(general)/layout.tsx
index fdd1a4e8..4ad6751b 100644
--- a/app/(general)/layout.tsx
+++ b/app/(general)/layout.tsx
@@ -2,6 +2,7 @@ import { ReactNode } from "react"
import { NetworkStatus } from "@/components/blockchain/network-status"
import { WalletConnect } from "@/components/blockchain/wallet-connect"
+import MagicProvider from "@/components/context/magicProvider"
import { Footer } from "@/components/layout/footer"
import { SiteHeader } from "@/components/layout/site-header"
import { FramerWrapper } from "@/components/providers/framer-wrapper"
@@ -13,17 +14,19 @@ interface RootLayoutProps {
export default function RootLayout({ children }: RootLayoutProps) {
return (
-
-
-
- {children}
-
-
-
-
-
-
-
-
+
+
+
+
+ {children}
+
+
+
+
+
+
+
+
+
)
}
diff --git a/app/layout.tsx b/app/layout.tsx
index f758a9a8..22fb53e6 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -10,6 +10,7 @@ import { Analytics } from "@vercel/analytics/react"
import { siteConfig } from "@/config/site"
import { cn } from "@/lib/utils"
+import MagicProvider from "@/components/context/magicProvider"
import RootProvider from "@/components/providers/root-provider"
import { Toaster } from "@/components/ui/toaster"
@@ -93,19 +94,17 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: ReactNode }) {
return (
- <>
-
-
- {children}
-
-
-
-
- >
+
+
+ {children}
+
+
+
+
)
}
diff --git a/components/blockchain/wallet-connect-custom.tsx b/components/blockchain/wallet-connect-custom.tsx
index 069e6175..565884fa 100644
--- a/components/blockchain/wallet-connect-custom.tsx
+++ b/components/blockchain/wallet-connect-custom.tsx
@@ -3,6 +3,8 @@ import { ConnectButton } from "@rainbow-me/rainbowkit"
import { Button } from "@/components/ui/button"
+import { useMagic } from "../context/magicProvider"
+
interface WalletConnectCustomProps extends HTMLAttributes {
classNameConnect?: string
classNameConnected?: string
@@ -17,6 +19,15 @@ export const WalletConnectCustom = ({
labelWrongNetwork = "Wrong Network",
...props
}: WalletConnectCustomProps) => {
+ const { magic } = useMagic()
+ const handleConnect = async () => {
+ if (!magic) {
+ return
+ }
+
+ await magic.wallet.connectWithUI()
+ }
+
return (
{({
@@ -37,7 +48,7 @@ export const WalletConnectCustom = ({
if (!connected) {
return (
<>
-