From 06d456b0abeb61b6f3605074a6bfaa12b1d2d99d Mon Sep 17 00:00:00 2001
From: Matthew Landauer
Date: Tue, 28 May 2024 02:56:15 +0000
Subject: [PATCH] Use link block component where we can
---
app/views/_tailwind/home/_stats.html.erb | 24 +++++++++----------
.../_tailwind/profiles/_comment.html.erb | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/app/views/_tailwind/home/_stats.html.erb b/app/views/_tailwind/home/_stats.html.erb
index 0a860e21a..a25a4c888 100644
--- a/app/views/_tailwind/home/_stats.html.erb
+++ b/app/views/_tailwind/home/_stats.html.erb
@@ -3,31 +3,31 @@
<%= render Tailwind::Heading.new(tag: :h1, extra_classes: "mb-12").with_content("This week at Planning Alerts") %>
-
- <%= link_to applications_path, class: "text-fuchsia focus:outline-none focus:bg-sun-yellow block" do %>
+ <%= render Tailwind::LinkBlock.new(url: applications_path) do %>
We collected
- <%= number_with_delimiter(Application.in_past_week.count) %>
- new applications
+ <%= number_with_delimiter(Application.in_past_week.count) %>
+ new applications
<% end %>
-
- <%= link_to new_profile_alert_path, class: "text-orange focus:outline-none focus:bg-sun-yellow block" do %>
+ <%= render Tailwind::LinkBlock.new(url: new_profile_alert_path) do %>
People received
- <%= number_with_delimiter(EmailBatch.total_sent_in_past_week) %>
- email alerts
+ <%= number_with_delimiter(EmailBatch.total_sent_in_past_week) %>
+ email alerts
<% end %>
-
- <%= link_to new_profile_alert_path, class: "text-green focus:outline-none focus:bg-sun-yellow block" do %>
+ <%= render Tailwind::LinkBlock.new(url: new_profile_alert_path) do %>
People signed up for
- <%= number_with_delimiter(Alert.active.in_past_week.count) %>
- new email alerts
+ <%= number_with_delimiter(Alert.active.in_past_week.count) %>
+ new email alerts
<% end %>
-
- <%= link_to comments_path, class: "text-lavender focus:outline-none focus:bg-sun-yellow block" do %>
+ <%= render Tailwind::LinkBlock.new(url: comments_path) do %>
People wrote
- <%= number_with_delimiter(Comment.visible.in_past_week.count) %>
- new comments
+ <%= number_with_delimiter(Comment.visible.in_past_week.count) %>
+ new comments
<% end %>
diff --git a/app/views/_tailwind/profiles/_comment.html.erb b/app/views/_tailwind/profiles/_comment.html.erb
index 0fe1f42f5..34fa4426b 100644
--- a/app/views/_tailwind/profiles/_comment.html.erb
+++ b/app/views/_tailwind/profiles/_comment.html.erb
@@ -18,7 +18,7 @@
<%= render Tailwind::QuotedBlock.new do %>
- <%= link_to comment, class: "block focus:outline-none focus:bg-sun-yellow" do %>
+ <%= render Tailwind::LinkBlock.new(url: comment_path(comment)) do %>
<%= render "comments/comment_text", comment: %>
<%# TODO: This space between the text and the date looks too big to me %>