app/views/properties/index.html.erb
<%= render(PageComponent.new) do |component| %>
<% component.with(:header) do %>
<%= render(Page::HeaderComponent.new(title: "Properties", buttons: [
link_to("Add property", new_property_path, class: "btn btn-primary")
])) %>
<% end %>
<% component.with(:body) do %>
<%= render "/shared/data_list", resource_name: "properties", collection: @properties, pagy: @pagy %>
<% end %>
<% end %>