-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
350 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const nextConfig = { | ||
/* config options here */ | ||
}; | ||
|
||
module.exports = nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import logo from "../static/dyad-logo.svg"; | ||
import { useNavigate } from "react-router-dom"; | ||
import { useRouter } from "next/router"; | ||
|
||
export default function NavbarLogo() { | ||
let navigate = useNavigate(); | ||
let router = useRouter(); | ||
|
||
return ( | ||
<img src={logo} alt="logo" className="w-14" onClick={() => navigate("/")} /> | ||
<img | ||
src={"./dyad-logo.svg"} | ||
alt={"logo"} | ||
className="w-14" | ||
onClick={() => router.push("/")} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from "react"; | ||
import { client, chains } from "../utils/wagmi-config"; | ||
import { ChakraProvider } from "@chakra-ui/react"; | ||
import { RainbowKitProvider } from "@rainbow-me/rainbowkit"; | ||
import { WagmiConfig } from "wagmi"; | ||
import "../App.css"; | ||
import "../index.css"; | ||
import "@rainbow-me/rainbowkit/styles.css"; | ||
|
||
export default function MyApp({ Component, pageProps }) { | ||
return ( | ||
<ChakraProvider> | ||
<WagmiConfig client={client}> | ||
<RainbowKitProvider chains={chains}> | ||
<Component {...pageProps} /> | ||
</RainbowKitProvider> | ||
</WagmiConfig> | ||
</ChakraProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Document, { Html, Head, Main, NextScript } from "next/document"; | ||
|
||
class MyDocument extends Document { | ||
static async getInitialProps(ctx) { | ||
const initialProps = await Document.getInitialProps(ctx); | ||
return { ...initialProps }; | ||
} | ||
|
||
render() { | ||
return ( | ||
<Html> | ||
<Head> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Inconsolata&display=swap" | ||
rel="stylesheet" | ||
/> | ||
</Head> | ||
<body className={"antialiased"} id={"modalBody"}> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
} | ||
|
||
export default MyDocument; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import Home from "../components/Home"; | ||
import Navbar from "../components/Navbar"; | ||
import Footer from "../components/Footer"; | ||
import { CURRENT_NETWORK } from "../consts/consts"; | ||
import Button from "../components/Button"; | ||
import { useAccount, useNetwork, useSwitchNetwork } from "wagmi"; | ||
|
||
export default function App() { | ||
const { isConnected } = useAccount(); | ||
const { chain } = useNetwork(); | ||
const { switchNetwork } = useSwitchNetwork(); | ||
|
||
return ( | ||
<> | ||
<div className="font-serif font-bold text-white page-container content-wrap"> | ||
<Navbar /> | ||
{isConnected ? ( | ||
<> | ||
{chain.id === CURRENT_NETWORK.id ? ( | ||
<div className="flex flex-col "> | ||
<Home /> | ||
</div> | ||
) : ( | ||
<div className="flex justify-center gap-2 mt-10"> | ||
Please switch to the {CURRENT_NETWORK.name} Network! | ||
<Button onClick={() => switchNetwork(CURRENT_NETWORK.id)}> | ||
Switch | ||
</Button> | ||
</div> | ||
)} | ||
</> | ||
) : ( | ||
<div className="flex justify-center mt-10">Connect your wallet!</div> | ||
)} | ||
<div className="footer"> | ||
<Footer /> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} |
Oops, something went wrong.