Skip to content

Commit

Permalink
[#57505] Turn project list into favorite without reloading the page
Browse files Browse the repository at this point in the history
  • Loading branch information
dombesz committed Sep 25, 2024
1 parent 496acf5 commit 6623d38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/components/projects/row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def favored
tag: :a,
tooltip_direction: :e,
href: helpers.build_favorite_path(project, format: :html),
data: { method: currently_favored? ? :delete : :post },
data: { "turbo-method": currently_favored? ? :delete : :post },
classes: currently_favored? ? "op-primer--star-icon " : "op-project-row-component--favorite",
label: currently_favored? ? I18n.t(:button_unfavorite) : I18n.t(:button_favorite),
aria: { label: currently_favored? ? I18n.t(:button_unfavorite) : I18n.t(:button_favorite) },
Expand Down Expand Up @@ -259,7 +259,7 @@ def more_menu_favorite_item
scheme: :default,
icon: "star",
href: helpers.build_favorite_path(project, format: :html),
data: { method: :post },
data: { "turbo-method": :post },
label: I18n.t(:button_favorite),
aria: { label: I18n.t(:button_favorite) }
}
Expand All @@ -273,7 +273,7 @@ def more_menu_unfavorite_item
icon: "star-fill",
size: :medium,
href: helpers.build_favorite_path(project, format: :html),
data: { method: :delete },
data: { "turbo-method": :delete },
classes: "op-primer--star-icon",
label: I18n.t(:button_unfavorite),
aria: { label: I18n.t(:button_unfavorite) }
Expand Down

0 comments on commit 6623d38

Please sign in to comment.