-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
4a27998
commit 7d13555
Showing
6 changed files
with
148 additions
and
1 deletion.
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
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,103 @@ | ||
import { ConnectButton } from "@rainbow-me/rainbowkit"; | ||
import Image from "next/image"; | ||
import logo from "../../public/logo.png"; | ||
|
||
export default function Connect() { | ||
return <> | ||
<div className="w-full h-screen flex flex-col justify-center items-center gap-16"> | ||
<Image src={logo} alt="logo" /> | ||
<ConnectButton.Custom> | ||
{({ | ||
account, | ||
chain, | ||
openAccountModal, | ||
openChainModal, | ||
openConnectModal, | ||
authenticationStatus, | ||
mounted, | ||
}) => { | ||
// Note: If your app doesn't use authentication, you | ||
// can remove all 'authenticationStatus' checks | ||
const ready = mounted && authenticationStatus !== 'loading'; | ||
const connected = | ||
ready && | ||
account && | ||
chain && | ||
(!authenticationStatus || | ||
authenticationStatus === 'authenticated'); | ||
|
||
return ( | ||
<div | ||
{...(!ready && { | ||
'aria-hidden': true, | ||
'style': { | ||
opacity: 0, | ||
pointerEvents: 'none', | ||
userSelect: 'none', | ||
}, | ||
})} | ||
> | ||
{(() => { | ||
if (!connected) { | ||
return ( | ||
<button onClick={openConnectModal} type="button" className="w-[490px] h-[93px] bg-[#3DB9CF] hover:bg-[#19D9CF] rounded-[25px] text-white text-[35px]"> | ||
Connect Wallet | ||
</button> | ||
); | ||
} | ||
|
||
if (chain.unsupported) { | ||
return ( | ||
<button onClick={openChainModal} type="button" className="bg-[#3DB9CF] rounded-[25px] text-white text-[35px]"> | ||
Wrong network | ||
</button> | ||
); | ||
} | ||
|
||
return ( | ||
<div style={{ display: 'flex', gap: 12 }}> | ||
<button | ||
onClick={openChainModal} | ||
style={{ display: 'flex', alignItems: 'center' }} | ||
type="button" | ||
> | ||
{chain.hasIcon && ( | ||
<div | ||
style={{ | ||
background: chain.iconBackground, | ||
width: 12, | ||
height: 12, | ||
borderRadius: 999, | ||
overflow: 'hidden', | ||
marginRight: 4, | ||
}} | ||
> | ||
{chain.iconUrl && ( | ||
<img | ||
alt={chain.name ?? 'Chain icon'} | ||
src={chain.iconUrl} | ||
style={{ width: 12, height: 12 }} | ||
/> | ||
)} | ||
</div> | ||
)} | ||
{chain.name} | ||
</button> | ||
|
||
<button onClick={openAccountModal} type="button"> | ||
{account.displayName} | ||
{account.displayBalance | ||
? ` (${account.displayBalance})` | ||
: ''} | ||
</button> | ||
</div> | ||
); | ||
})()} | ||
</div> | ||
); | ||
}} | ||
</ConnectButton.Custom> | ||
|
||
</div> | ||
</> | ||
} |
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,33 @@ | ||
import Image from "next/image"; | ||
import logo from "../../public/logo.png"; | ||
import { useState } from "react"; | ||
|
||
export default function Search() { | ||
const [isAvailable, setIsAvailable] = useState(false); | ||
const [domain, setDomain] = useState(""); | ||
|
||
console.log(domain) | ||
return ( | ||
<> | ||
<div className="w-full h-screen flex flex-col justify-center items-center"> | ||
<Image src={logo} alt="logo" className="mb-[80px]" /> | ||
<h1 className="text-[35px]">SEARCH FOR A NAME!</h1> | ||
<input | ||
onChange={(e) => { | ||
setDomain(e.currentTarget.value + ".me"); | ||
}} | ||
type="text" | ||
className="w-[596px] h-[101px] rounded-[15px] border-[5px] border-black text-[50px] px-4" | ||
/> | ||
<p className="text-[#3DB9CF] text-[20px]"> | ||
{isAvailable ? "Available" : "Taken"} | ||
</p> | ||
{isAvailable ? null : ( | ||
<button className="text-[20px] w-[354px] h-[78px] bg-[#3DB9CF] rounded-[10px] text-white"> | ||
Marketplace | ||
</button> | ||
)} | ||
</div> | ||
</> | ||
); | ||
} |
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