mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-12-09 02:42:30 -05:00
reorganize providers
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import type { Metadata } from "next";
|
||||
import "./globals.css";
|
||||
|
||||
import "~/app/globals.css";
|
||||
import { Providers } from "~/app/providers";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Farcaster Frames v2 Demo",
|
||||
@@ -13,7 +15,9 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
<body>
|
||||
<Providers>{children}</Providers>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import { App } from "~/components/App";
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
const Demo = dynamic(() => import("~/components/Demo"), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<main className="min-h-screen flex flex-col p-4">
|
||||
<App />
|
||||
<Demo />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
14
src/app/providers.tsx
Normal file
14
src/app/providers.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
const WagmiProvider = dynamic(
|
||||
() => import("~/components/providers/WagmiProvider"),
|
||||
{
|
||||
ssr: false,
|
||||
}
|
||||
);
|
||||
|
||||
export function Providers({ children }: { children: React.ReactNode }) {
|
||||
return <WagmiProvider>{children}</WagmiProvider>;
|
||||
}
|
||||
Reference in New Issue
Block a user