Skip to content

Commit

Permalink
Merge pull request #13 from getAlby/cancel-button
Browse files Browse the repository at this point in the history
Cancel button
  • Loading branch information
rolznz authored Jan 8, 2024
2 parents 6fee731 + 3490da6 commit fb3511a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pages/wallet/Items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ export function Items() {
></input>
<p>Price in sats</p>
<input
type="number"
inputMode="numeric"
pattern="[0-9]*"
className="input input-bordered w-full"
value={itemPrice}
onChange={(e) => setItemPrice(e.target.value)}
Expand Down
10 changes: 10 additions & 0 deletions src/pages/wallet/Pay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useProfilePubkey } from "../../hooks/useProfilePubkey";
import useStore from "../../state/store";

export function Pay() {
const { clearCart } = useStore();
const { invoice } = useParams();
const navigate = useNavigate();
const { cart, provider } = useStore();
Expand Down Expand Up @@ -69,6 +70,15 @@ export function Pay() {
<span className="loading loading-spinner text-primary"></span>
Waiting for payment...
</p>
<button
onClick={() => {
clearCart();
navigate("../new");
}}
className="btn"
>
Cancel
</button>
</div>
</>
);
Expand Down

0 comments on commit fb3511a

Please sign in to comment.