From 1cf0e6fc7916b17907141aaea5a9327fd20a27c3 Mon Sep 17 00:00:00 2001 From: martintomas Date: Tue, 29 Oct 2024 12:26:15 +0100 Subject: [PATCH] fix: download button icon --- app/javascript/components/tpi/DownloadFormModal.jsx | 3 ++- app/views/tpi/companies/show.html.erb | 2 +- app/views/tpi/sectors/index.html.erb | 2 +- app/views/tpi/sectors/show.html.erb | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/javascript/components/tpi/DownloadFormModal.jsx b/app/javascript/components/tpi/DownloadFormModal.jsx index e4bd16c6e..9079098b5 100644 --- a/app/javascript/components/tpi/DownloadFormModal.jsx +++ b/app/javascript/components/tpi/DownloadFormModal.jsx @@ -6,6 +6,7 @@ import { Modal } from './Modal'; import { OverlayProvider } from '@react-aria/overlays'; import Select from './Select'; import classNames from 'classnames'; +import downloadIcon from 'images/icons/download.svg'; const Field = ({ label, name, value, onChange, type, required, error, placeholder, children }) => { const ref = useRef(null); @@ -138,7 +139,7 @@ function DownloadFormModal({ downloadUrl }) { return (
diff --git a/app/views/tpi/companies/show.html.erb b/app/views/tpi/companies/show.html.erb index 722f0916c..e5a111126 100644 --- a/app/views/tpi/companies/show.html.erb +++ b/app/views/tpi/companies/show.html.erb @@ -15,7 +15,7 @@ <%= react_component('DownloadFormModal', { downloadUrl: user_download_all_tpi_sectors_path }) %> - <%= link_to user_download_methodology_tpi_sectors_path, class: 'button is-primary is-pulled-right with-icon with-border' do %> + <%= button_to user_download_methodology_tpi_sectors_path, class: 'button is-primary is-pulled-right with-icon with-border', method: :get do %> download icon Methodology <% end %> diff --git a/app/views/tpi/sectors/index.html.erb b/app/views/tpi/sectors/index.html.erb index 6a91c8e83..d10cda863 100644 --- a/app/views/tpi/sectors/index.html.erb +++ b/app/views/tpi/sectors/index.html.erb @@ -18,7 +18,7 @@ <%= react_component('DownloadFormModal', { downloadUrl: user_download_all_tpi_sectors_path }) %> - <%= link_to user_download_methodology_tpi_sectors_path, class: 'button is-primary is-pulled-right with-icon with-border' do %> + <%= button_to user_download_methodology_tpi_sectors_path, class: 'button is-primary is-pulled-right with-icon with-border', method: :get do %> download icon Methodology <% end %> diff --git a/app/views/tpi/sectors/show.html.erb b/app/views/tpi/sectors/show.html.erb index fc37aa3f5..047635637 100644 --- a/app/views/tpi/sectors/show.html.erb +++ b/app/views/tpi/sectors/show.html.erb @@ -18,7 +18,7 @@ <%= react_component('DownloadFormModal', { downloadUrl: user_download_tpi_sector_path(@sector) }) %> - <%= link_to user_download_methodology_tpi_sectors_path, class: 'button is-primary is-pulled-right with-icon with-border' do %> + <%= button_to user_download_methodology_tpi_sectors_path, class: 'button is-primary is-pulled-right with-icon with-border', method: :get do %> download icon Methodology <% end %>