Skip to content

Commit

Permalink
add zap
Browse files Browse the repository at this point in the history
  • Loading branch information
temptemp3 committed Jan 9, 2025
1 parent c5c1cff commit 2c869ed
Show file tree
Hide file tree
Showing 10 changed files with 978 additions and 12 deletions.
45 changes: 45 additions & 0 deletions components/ZapButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { Modal, Button } from "components/ui";

function ZapButton({ amount, recipient }) {
const [showConfirmModal, setShowConfirmModal] = useState(false);

return (
<>
<Button onClick={() => setShowConfirmModal(true)}>
Zap {amount} sats
</Button>

<Modal
isOpen={showConfirmModal}
onClose={() => setShowConfirmModal(false)}
title="Confirm Zap"
>
<div className="space-y-4">
<div className="text-sm">
<p>You are about to zap:</p>
<p className="font-bold">{amount} sats</p>
<p>to:</p>
<p className="font-bold">{recipient}</p>
</div>

<div className="flex justify-end gap-2">
<Button
variant="outline"
onClick={() => setShowConfirmModal(false)}
>
Cancel
</Button>
<Button
onClick={() => {
handleZap();
setShowConfirmModal(false);
}}
>
Confirm Zap
</Button>
</div>
</div>
</Modal>
</>
);
}
38 changes: 34 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"lute-connect": "^1.4.1",
"moment": "^2.30.1",
"react": "^18.2.0",
"react-canvas-confetti": "^2.0.7",
"react-confetti": "^6.1.0",
"react-dom": "^18.2.0",
"react-fast-marquee": "^1.6.4",
Expand All @@ -52,7 +53,7 @@
"react-toastify": "^10.0.4",
"react-use": "^17.5.1",
"styled-components": "^6.1.8",
"ulujs": "^0.12.1",
"ulujs": "^0.12.2",
"usehooks-ts": "^2.15.0"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 2c869ed

Please sign in to comment.