feat: move to nextjs
This commit is contained in:
BIN
app/icon.png
Normal file
BIN
app/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
17
app/layout.tsx
Normal file
17
app/layout.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { IndexLayout as IndexLayoutC } from "@/components/layouts/IndexLayout";
|
||||
import { getMetadata } from "@/utils";
|
||||
|
||||
export const metadata = getMetadata({
|
||||
title: "Impersonator",
|
||||
description:
|
||||
"Impersonate any Ethereum Account and Login into DApps via WalletConnect, iframe or Extension!",
|
||||
images: "https://www.impersonator.xyz/metaIMG.PNG",
|
||||
});
|
||||
|
||||
export default function IndexLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return <IndexLayoutC>{children}</IndexLayoutC>;
|
||||
}
|
||||
15
app/page.tsx
Normal file
15
app/page.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import Body from "@/components/Body";
|
||||
import Navbar from "@/components/Navbar";
|
||||
import Footer from "@/components/Footer";
|
||||
|
||||
const Home = () => {
|
||||
return (
|
||||
<div>
|
||||
<Navbar />
|
||||
<Body />
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Home;
|
||||
64
app/providers.tsx
Normal file
64
app/providers.tsx
Normal file
@@ -0,0 +1,64 @@
|
||||
"use client";
|
||||
|
||||
import "@rainbow-me/rainbowkit/styles.css";
|
||||
|
||||
import { CacheProvider } from "@chakra-ui/next-js";
|
||||
import { ChakraProvider } from "@chakra-ui/react";
|
||||
import {
|
||||
connectorsForWallets,
|
||||
RainbowKitProvider,
|
||||
darkTheme,
|
||||
} from "@rainbow-me/rainbowkit";
|
||||
import {
|
||||
metaMaskWallet,
|
||||
walletConnectWallet,
|
||||
rainbowWallet,
|
||||
} from "@rainbow-me/rainbowkit/wallets";
|
||||
import { configureChains, createConfig, WagmiConfig } from "wagmi";
|
||||
import { mainnet, optimism, base, arbitrum } from "wagmi/chains";
|
||||
import { publicProvider } from "wagmi/providers/public";
|
||||
|
||||
import theme from "@/style/theme";
|
||||
import { SafeInjectProvider } from "@/contexts/SafeInjectContext";
|
||||
|
||||
const { chains, publicClient } = configureChains(
|
||||
// the first chain is used by rainbowWallet to determine which chain to use
|
||||
[mainnet, optimism, base, arbitrum],
|
||||
[publicProvider()]
|
||||
);
|
||||
|
||||
const projectId = process.env.NEXT_PUBLIC_WC_PROJECT_ID!;
|
||||
const connectors = connectorsForWallets([
|
||||
{
|
||||
groupName: "Recommended",
|
||||
wallets: [
|
||||
metaMaskWallet({ projectId, chains }),
|
||||
walletConnectWallet({ projectId, chains }),
|
||||
rainbowWallet({ projectId, chains }),
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
export const wagmiConfig = createConfig({
|
||||
autoConnect: false,
|
||||
connectors,
|
||||
publicClient,
|
||||
});
|
||||
|
||||
export const Providers = ({ children }: { children: React.ReactNode }) => {
|
||||
return (
|
||||
<CacheProvider>
|
||||
<ChakraProvider theme={theme}>
|
||||
<WagmiConfig config={wagmiConfig}>
|
||||
<RainbowKitProvider
|
||||
chains={chains}
|
||||
theme={darkTheme()}
|
||||
modalSize={"compact"}
|
||||
>
|
||||
<SafeInjectProvider>{children}</SafeInjectProvider>
|
||||
</RainbowKitProvider>
|
||||
</WagmiConfig>
|
||||
</ChakraProvider>
|
||||
</CacheProvider>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user