Skip to content

Commit

Permalink
🌸 Marketplace: Checkout button is not shown until you can Checkout
Browse files Browse the repository at this point in the history
- #1326
- #1983 (comment)

It feels odd that we have a `Checkout` button when you can't click it.
  • Loading branch information
zspencer committed Dec 5, 2023
1 parent 22ee5f9 commit 5a92f6b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/furniture/marketplace/carts/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
<%= render "marketplace/carts/total", cart: cart %>
</td>
</tr>
<tr>
<td class="text-right py-3.5" colspan="8">
<%= render ButtonComponent.new(label: "Checkout", href: cart.location(child: :checkout), scheme: :primary, method: :get, disabled: !cart.ready_for_checkout?) %>
</td>
</tr>
<%- if cart.ready_for_checkout? %>
<tr>
<td class="text-right py-3.5" colspan="8">
<%= render ButtonComponent.new(label: "Checkout", href: cart.location(child: :checkout), scheme: :primary, method: :get) %>
</td>
</tr>
<%- end %>
</tfoot>

0 comments on commit 5a92f6b

Please sign in to comment.