Skip to content

Commit

Permalink
Merge pull request #49 from dwhiffing/logout-confirmation
Browse files Browse the repository at this point in the history
Adds logout confirmation
  • Loading branch information
dwhiffing authored Sep 10, 2024
2 parents 664315d + 5928caa commit 1e4f5a4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ContractItem } from "@/components/ContractItem";
import { useContracts } from "@/utils/useContracts";
import { ScrollArea } from "@/components/ui/scroll-area";
import { EditContractModal } from "@/components/EditContractModal";
import { ConfirmAlert } from "@/components/ConfirmAlert";

export default function Page() {
const { contracts } = useContracts();
Expand Down Expand Up @@ -60,11 +61,15 @@ export default function Page() {
<div className="flex flex-1 flex-col">
<ChatWindow titleText="Magic Chat Prototype" />

<div className="flex gap-4 justify-end">
<div className="flex gap-4 justify-end px-6">
<Button onClick={() => magic?.wallet.showUI()}>
Show Wallet
</Button>
<Button onClick={handleLogout}>Logout</Button>
<ConfirmAlert
onConfirm={handleLogout}
button={<Button>Logout</Button>}
description="Are you sure you want to logout?"
/>
</div>
</div>
</div>
Expand Down

0 comments on commit 1e4f5a4

Please sign in to comment.