Remove duplication in cards tables

We were using the same code in two places, so we're extracting the code
into a component in order to share it.
This commit is contained in:
Javi Martín
2021-01-06 20:05:00 +01:00
parent b6f133b6c8
commit 5148919c17
9 changed files with 49 additions and 75 deletions

View File

@@ -0,0 +1,8 @@
class Admin::Widget::Cards::TableComponent < ApplicationComponent
attr_reader :cards, :no_cards_message
def initialize(cards, no_cards_message:)
@cards = cards
@no_cards_message = no_cards_message
end
end