From 067d53cccf4c2f4a46eca40bf2d8f71498cc5f76 Mon Sep 17 00:00:00 2001
From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com>
Date: Wed, 2 Oct 2024 11:44:35 +0100
Subject: [PATCH] Refactor, remove present checks of href
---
app/components/create_log_actions_component.html.erb | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/app/components/create_log_actions_component.html.erb b/app/components/create_log_actions_component.html.erb
index f956ecb54..c7c4ec249 100644
--- a/app/components/create_log_actions_component.html.erb
+++ b/app/components/create_log_actions_component.html.erb
@@ -1,12 +1,10 @@
<% if display_actions? %>
- <% if create_button_href.present? %>
- <%= govuk_button_to create_button_copy, create_button_href, class: "govuk-!-margin-right-6" %>
- <% end %>
- <% if upload_button_href.present? && !user.support? %>
- <%= govuk_button_link_to upload_button_copy, upload_button_href, secondary: true %>
- <% end %>
- <% if view_uploads_button_href.present? && user.support? %>
+ <%= govuk_button_to create_button_copy, create_button_href, class: "govuk-!-margin-right-6" %>
+ <% unless user.support? %>
+ <%= govuk_button_link_to upload_button_copy, upload_button_href, secondary: true %>
+ <% end %>
+ <% if user.support? %>
<%= govuk_button_link_to view_uploads_button_copy, view_uploads_button_href, secondary: true %>
<% end %>