generated from Markkos89/turbo-monorepo-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from Developer-DAO/feat/custom-connect-button
Feat/custom-connect-button
- Loading branch information
Showing
17 changed files
with
223 additions
and
114 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,65 @@ | ||
/* eslint-disable @typescript-eslint/strict-boolean-expressions */ | ||
import { ConnectButton as RainbowkitConnectButton } from "@rainbow-me/rainbowkit"; | ||
import Image from "next/image"; | ||
import { Button } from "ui/components/ui/button"; | ||
|
||
export const ConnectButton = () => { | ||
return ( | ||
<RainbowkitConnectButton.Custom> | ||
{({ | ||
account, | ||
chain, | ||
openAccountModal, | ||
openChainModal, | ||
openConnectModal, | ||
authenticationStatus, | ||
mounted, | ||
}) => { | ||
const ready = mounted && authenticationStatus !== "loading"; | ||
const connected = | ||
ready && | ||
account && | ||
chain && | ||
(!authenticationStatus || authenticationStatus === "authenticated"); | ||
|
||
if (!ready) { | ||
return ( | ||
<Button className="button-rounded" disabled> | ||
loading | ||
</Button> | ||
); | ||
} | ||
|
||
return ( | ||
<> | ||
{!connected ? ( | ||
<Button | ||
onClick={openConnectModal} | ||
className="button-rounded hover:bg-[var(--button-secondary-dark)]" | ||
> | ||
Connect | ||
</Button> | ||
) : chain.unsupported ? ( | ||
<Button | ||
onClick={openChainModal} | ||
className="button-rounded hover:bg-[var(--button-accent-dark)]" | ||
> | ||
Switch Network | ||
</Button> | ||
) : ( | ||
<button onClick={openAccountModal}> | ||
<Image | ||
src={account.ensAvatar !== undefined ? account.ensAvatar : "/DD_NFT_avatar.png"} | ||
alt="account avatar" | ||
width={50} | ||
height={50} | ||
className="rounded-full border-2 border-black p-0 opacity-80 shadow-sm" | ||
/> | ||
</button> | ||
)} | ||
</> | ||
); | ||
}} | ||
</RainbowkitConnectButton.Custom> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
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,3 +1,32 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
.text-bttf { | ||
@apply text-center text-lg leading-[91%] tracking-[1px] transition-colors; | ||
font-family: var(--font-future); | ||
} | ||
|
||
.academy-grid { | ||
@apply grid h-screen grid-cols-1 text-white md:grid-cols-2; | ||
} | ||
|
||
.academy-grid .academy-grid-col-1 { | ||
@apply flex flex-col items-center justify-between px-4 py-6 text-center; | ||
} | ||
|
||
.academy-grid .text-bttf-lg { | ||
@apply text-bttf mb-12 mt-10 h-full uppercase; | ||
} | ||
|
||
.dd-nft { | ||
@apply relative py-6 pr-6; | ||
background: | ||
linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%), | ||
url("/D_D_NFT_image.png"), | ||
var(--academy-bg-dark) -406.375px -146px / 219.132% 181.543% no-repeat; | ||
box-shadow: 0px 4px 35px 0px rgba(0, 0, 0, 0.25); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
background-position: center; | ||
} |
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
Oops, something went wrong.
b0163ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
academy-turbo – ./apps/academy
academy-turbo-git-main-developdao.vercel.app
academy-turbo-academy.vercel.app
academy-turbo-developdao.vercel.app