-
Notifications
You must be signed in to change notification settings - Fork 0
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
a52759c
commit 2cd7cba
Showing
5 changed files
with
36 additions
and
44 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
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,33 +1,31 @@ | ||
'use client' | ||
|
||
import { ConnectButton } from '@rainbow-me/rainbowkit' | ||
import { SignTokenButton } from './SignTokenButton' | ||
import { ConnectButton } from "@rainbow-me/rainbowkit"; | ||
import { SignTokenButton } from "./SignTokenButton"; | ||
|
||
interface LoginProps { | ||
title: string | ||
description: string | ||
handleRedirect: () => void | ||
title: string; | ||
description: string; | ||
handleRedirect?: () => void; | ||
} | ||
|
||
export const Login = ({ title, description, handleRedirect }: LoginProps) => { | ||
return ( | ||
<div className="grid min-h-[calc(100vh-250px)] place-items-center py-4 md:p-4"> | ||
<div className="max-w-xl text-center"> | ||
<h1 className="mb-4 text-4xl font-bold">{title}</h1> | ||
<p className="mb-8 text-lg text-gray-500 dark:text-alpha-900"> | ||
{description} | ||
</p> | ||
<div className="mt-8 rounded-md border bg-gray-100 dark:border-gray-500 dark:bg-gray-700"> | ||
<div className="flex flex-col items-center p-4"> | ||
<h2 className="mb-4 text-xl">Step 1: Connect your wallet</h2> | ||
<ConnectButton /> | ||
</div> | ||
<div className="flex flex-col items-center border-t p-4 dark:border-gray-500"> | ||
<h2 className="mb-4 text-xl">Step 2: Authenticate your wallet</h2> | ||
<SignTokenButton handleRedirect={handleRedirect} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
return ( | ||
<div className="grid min-h-[calc(100vh-250px)] place-items-center py-4 md:p-4"> | ||
<div className="max-w-xl text-center"> | ||
<h1 className="mb-4 text-4xl font-bold">{title}</h1> | ||
<p className="mb-8 text-lg text-gray-500 dark:text-alpha-900"> | ||
{description} | ||
</p> | ||
<div className="mt-8 rounded-md border bg-gray-100 dark:border-gray-500 dark:bg-gray-700"> | ||
<div className="flex flex-col items-center p-4"> | ||
<h2 className="mb-4 text-xl">Step 1: Connect your wallet</h2> | ||
<ConnectButton /> | ||
</div> | ||
<div className="flex flex-col items-center border-t p-4 dark:border-gray-500"> | ||
<h2 className="mb-4 text-xl">Step 2: Authenticate your wallet</h2> | ||
<SignTokenButton handleRedirect={() => handleRedirect?.()} /> | ||
</div> | ||
</div> | ||
</div> | ||
</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
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,12 +1,14 @@ | ||
'use client' | ||
|
||
// Components | ||
export * from './components/CustomAvatar' | ||
export * from './components/RainbowKitClientProvider' | ||
export * from './components/Login' | ||
export * from './components/SignTokenButton' | ||
export { CustomAvatar } from './components/CustomAvatar' | ||
export { RainbowKitClientProvider } from './components/RainbowKitClientProvider' | ||
export { Login } from './components/Login' | ||
export { SignTokenButton } from './components/SignTokenButton' | ||
|
||
// Data | ||
export * from './lib/data/iqTestnet' | ||
export * from './lib/data/rainbowKitTheme' | ||
export { iqTestnet } from './lib/data/iqTestnet' | ||
export { iqWikiTheme } from './lib/data/rainbowKitTheme' | ||
|
||
// Integrations | ||
export * from './lib/integrations/web3-auth-connector' | ||
export { rainbowWeb3AuthConnector } from './lib/integrations/web3-auth-connector' |