-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove mintDemoWrapper, correctly place avatar
- Loading branch information
1 parent
7f3512f
commit 76b1b17
Showing
3 changed files
with
31 additions
and
50 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
38 changes: 12 additions & 26 deletions
38
examples/ui-demo/src/components/preview/AuthCardWrapper.tsx
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,43 +1,29 @@ | ||
import { useConfig } from "@/app/state"; | ||
import { cn } from "@/lib/utils"; | ||
import { | ||
AuthCard, | ||
useLogout, | ||
useUser, | ||
} from "@account-kit/react"; | ||
import { MintDemoWrapper } from "./MintDemoWrapper"; | ||
import { AuthCard, useUser } from "@account-kit/react"; | ||
import { MintCard } from "../shared/MintCard"; | ||
|
||
export function AuthCardWrapper({ className }: { className?: string }) { | ||
const user = useUser(); | ||
const { config } = useConfig(); | ||
const { logout } = useLogout(); | ||
return ( | ||
<div | ||
className={cn( | ||
"flex flex-1 flex-col justify-center items-center overflow-auto relative", | ||
config.ui.theme === "dark" ? "bg-black/70" : "bg-white", | ||
user ? "justify-start pt-[180px]" : '', | ||
user ? "justify-start pt-[180px]" : "", | ||
className | ||
)} | ||
> | ||
{ | ||
!user ? ( | ||
<div className="flex flex-col gap-2 w-[368px]"> | ||
<div className="modal bg-surface-default shadow-md overflow-hidden"> | ||
<AuthCard /> | ||
</div> | ||
</div> | ||
) : <MintDemoWrapper /> | ||
} | ||
{user && ( | ||
<button | ||
className="text-primary font-semibold text-sm px-3 py-[11px] bg-white border border-gray-300 rounded-lg hover:shadow-md" | ||
onClick={() => { | ||
logout(); | ||
}} | ||
> | ||
Logout | ||
</button>)} | ||
{!user ? ( | ||
<div className="flex flex-col gap-2 w-[368px]"> | ||
<div className="modal bg-surface-default shadow-md overflow-hidden"> | ||
<AuthCard /> | ||
</div> | ||
</div> | ||
) : ( | ||
<MintCard /> | ||
)} | ||
</div> | ||
); | ||
} |
16 changes: 0 additions & 16 deletions
16
examples/ui-demo/src/components/preview/MintDemoWrapper.tsx
This file was deleted.
Oops, something went wrong.