diff --git a/app/controllers/incomes_controller.rb b/app/controllers/incomes_controller.rb
index def3700..2112628 100644
--- a/app/controllers/incomes_controller.rb
+++ b/app/controllers/incomes_controller.rb
@@ -10,6 +10,11 @@ class IncomesController < ApplicationController
# GET /incomes or /incomes.json
def index
@incomes = Income.all
+
+ respond_to do |format|
+ format.html
+ format.turbo_stream
+ end
end
# GET /incomes/1 or /incomes/1.json
diff --git a/app/views/components/_toolbar.html.erb b/app/views/components/_toolbar.html.erb
index 0b2be74..712a41f 100644
--- a/app/views/components/_toolbar.html.erb
+++ b/app/views/components/_toolbar.html.erb
@@ -1,3 +1,5 @@
+<%# locals: (active_tab:) %>
+
<%= turbo_frame_tag "dashboard_toolbar" do %>
-
@@ -7,7 +9,7 @@
<%= link_to "Federal Tax Brackets", federal_tax_brackets_path, data: { turbo_stream: true }, class: active_tab == :federal_tax_brackets ? "active-toolbar-tab" : "inactive-toolbar-tab" %>
-
- <%= link_to "Incomes", incomes_path, data: { turbo: false }, class: active_tab == :incomes ? "active-toolbar-tab" : "inactive-toolbar-tab" %>
+ <%= link_to "Incomes", incomes_path, data: { turbo_stream: true }, class: active_tab == :incomes ? "active-toolbar-tab" : "inactive-toolbar-tab" %>
-
<%= link_to "Fixed Expenses", fixed_expenses_path, data: { turbo: false }, class: active_tab == :fixed_expenses ? "active-toolbar-tab" : "inactive-toolbar-tab" %>
diff --git a/app/views/incomes/_dashboard.html.erb b/app/views/incomes/_dashboard.html.erb
new file mode 100644
index 0000000..bcbe1dd
--- /dev/null
+++ b/app/views/incomes/_dashboard.html.erb
@@ -0,0 +1,3 @@
+<%= turbo_frame_tag "primary_frame" do %>
+ <%= render partial: "incomes/index" %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/incomes/index.turbo_stream.erb b/app/views/incomes/index.turbo_stream.erb
new file mode 100644
index 0000000..46a8598
--- /dev/null
+++ b/app/views/incomes/index.turbo_stream.erb
@@ -0,0 +1,2 @@
+<%= turbo_stream.replace "primary_frame", partial: "incomes/dashboard" %>
+<%= turbo_stream.replace "dashboard_toolbar", partial: "components/toolbar", locals: { active_tab: :incomes } %>
\ No newline at end of file