-
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
7ee5f44
commit 7b21904
Showing
4 changed files
with
59 additions
and
0 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,46 @@ | ||
"use client"; | ||
|
||
import { LoginPopover } from "@/components/login-popover"; | ||
import { Logo } from "@/components/logo"; | ||
import ProfileDropdown from "@/components/profile-dropdown"; | ||
import { TopBar, Typography } from "@mochi-ui/core"; | ||
import { useLoginWidget } from "@mochi-web3/login-widget"; | ||
import { CheckCircleHalfColoredLine } from "@mochi-ui/icons"; | ||
import { Suspense } from "react"; | ||
import { useSearchParams } from "next/navigation"; | ||
|
||
const Auth = () => { | ||
const searchParams = useSearchParams(); | ||
const code = searchParams.get("code"); | ||
|
||
return ( | ||
<div className="w-full min-h-[calc(100vh-56px)] flex flex-col items-center justify-center text-center px-4 space-y-6"> | ||
<div className="rounded-full bg-success-plain-active w-24 h-24 flex items-center justify-center border-[16px] border-success-soft"> | ||
<CheckCircleHalfColoredLine className="w-10 h-10 text-success-solid" /> | ||
</div> | ||
<p className="text-2xl sm:text-3.5xl sm:leading-9 font-semibold text-text-primary"> | ||
You're already logged in. | ||
</p> | ||
<p className="text-base sm:text-lg text-text-primary"> | ||
Continue setting up Tono Bot for your community by going back to your | ||
Discord server. | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default function Page() { | ||
const { isLoggedIn } = useLoginWidget(); | ||
|
||
return ( | ||
<main> | ||
<TopBar | ||
leftSlot={<Logo />} | ||
rightSlot={!isLoggedIn ? <LoginPopover /> : <ProfileDropdown />} | ||
/> | ||
<Suspense> | ||
<Auth /> | ||
</Suspense> | ||
</main> | ||
); | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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