Use tabnav component for wallet view
This commit is contained in:
parent
cd46daa6ba
commit
ea6173c60f
@ -1,11 +1,7 @@
|
|||||||
<main class="w-full max-w-6xl mx-auto pb-12 px-4 md:px-6 lg:px-8">
|
<main class="w-full max-w-6xl mx-auto pb-12 px-4 md:px-6 lg:px-8">
|
||||||
<div class="bg-white rounded-lg shadow">
|
<div class="bg-white rounded-lg shadow">
|
||||||
<div class="px-6 sm:px-12 pt-2 sm:pt-4">
|
<div class="px-6 sm:px-12 pt-2 sm:pt-4">
|
||||||
<div class="border-b border-gray-200">
|
|
||||||
<nav class="-mb-px flex" aria-label="Tabs">
|
|
||||||
<%= render partial: @tabnav_partial %>
|
<%= render partial: @tabnav_partial %>
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="px-6 sm:px-12 py-8 sm:py-12">
|
<div class="px-6 sm:px-12 py-8 sm:py-12">
|
||||||
<%= content %>
|
<%= content %>
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
<%= render TabnavLinkComponent.new(
|
<div class="border-b border-gray-200">
|
||||||
|
<nav class="-mb-px flex" aria-label="Tabs">
|
||||||
|
<%= render TabnavLinkComponent.new(
|
||||||
name: "Donations", path: contributions_donations_path,
|
name: "Donations", path: contributions_donations_path,
|
||||||
active: current_page?(contributions_donations_path)
|
active: current_page?(contributions_donations_path)
|
||||||
) %>
|
) %>
|
||||||
<%= render TabnavLinkComponent.new(
|
<%= render TabnavLinkComponent.new(
|
||||||
name: "Projects", path: contributions_projects_path,
|
name: "Projects", path: contributions_projects_path,
|
||||||
active: current_page?(contributions_projects_path)
|
active: current_page?(contributions_projects_path)
|
||||||
) %>
|
) %>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
14
app/views/shared/_tabnav_wallet.html.erb
Normal file
14
app/views/shared/_tabnav_wallet.html.erb
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<section>
|
||||||
|
<div class="border-b border-gray-200">
|
||||||
|
<nav class="-mb-px flex" aria-label="Tabs">
|
||||||
|
<%= render TabnavLinkComponent.new(
|
||||||
|
name: "Info", path: wallet_path,
|
||||||
|
active: current_page?(wallet_path)
|
||||||
|
) %>
|
||||||
|
<%= render TabnavLinkComponent.new(
|
||||||
|
name: "Transactions", path: wallet_transactions_path,
|
||||||
|
active: current_page?(wallet_transactions_path)
|
||||||
|
) %>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</section>
|
@ -3,14 +3,7 @@
|
|||||||
<%= render MainSimpleComponent.new do %>
|
<%= render MainSimpleComponent.new do %>
|
||||||
<%= render WalletSummaryComponent.new(balance: @balance) %>
|
<%= render WalletSummaryComponent.new(balance: @balance) %>
|
||||||
|
|
||||||
<section>
|
<%= render partial: "shared/tabnav_wallet" %>
|
||||||
<div class="border-b border-gray-200">
|
|
||||||
<nav class="-mb-px flex" aria-label="Tabs">
|
|
||||||
<%= link_to "Info", wallet_path, class: "border-indigo-500 text-indigo-600 w-1/2 py-4 px-1 text-center border-b-2", "aria-current": "page" %>
|
|
||||||
<%= link_to "Transactions", wallet_transactions_path, class: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 w-1/2 py-4 px-1 text-center border-b-2" %>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h3>Lightning Address</h3>
|
<h3>Lightning Address</h3>
|
||||||
|
@ -3,14 +3,7 @@
|
|||||||
<%= render MainSimpleComponent.new do %>
|
<%= render MainSimpleComponent.new do %>
|
||||||
<%= render WalletSummaryComponent.new(balance: @balance) %>
|
<%= render WalletSummaryComponent.new(balance: @balance) %>
|
||||||
|
|
||||||
<section>
|
<%= render partial: "shared/tabnav_wallet" %>
|
||||||
<div class="border-b border-gray-200">
|
|
||||||
<nav class="-mb-px flex" aria-label="Tabs">
|
|
||||||
<%= link_to "Info", wallet_path, class: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 w-1/2 py-4 px-1 text-center border-b-2" %>
|
|
||||||
<%= link_to "Transactions", wallet_transactions_path, class: "border-indigo-500 text-indigo-600 w-1/2 py-4 px-1 text-center border-b-2", "aria-current": "page" %>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h3 class="hidden">Transactions</h3>
|
<h3 class="hidden">Transactions</h3>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user