diff --git a/app/components/lookbook/icon/component.html.erb b/app/components/lookbook/icon/component.html.erb index b7c7b5592..bd2833565 100644 --- a/app/components/lookbook/icon/component.html.erb +++ b/app/components/lookbook/icon/component.html.erb @@ -1,3 +1,5 @@ <%= render_component_tag :i, style: "height: #{size_rems}; width: #{size_rems}; #{@html_attrs[:style]}", class: "icon-stroke-#{stroke}" do %> - <%= svg %> -<% end %> \ No newline at end of file + + + +<% end %> diff --git a/app/components/lookbook/icon/component.rb b/app/components/lookbook/icon/component.rb index 70b043b44..3add00981 100644 --- a/app/components/lookbook/icon/component.rb +++ b/app/components/lookbook/icon/component.rb @@ -14,21 +14,5 @@ def initialize(name:, size: 4, stroke: 2, **html_attrs) def size_rems "#{@size * 0.25}rem" end - - def svg - ICON_CACHE[@icon_name] ||= read_svg - end - - def read_svg - File.read(svg_path).html_safe - rescue - if Rails.env.development? || Rails.env.test? - raise "`#{@icon_name}` is not a valid icon name" - end - end - - def svg_path - Lookbook::Engine.root.join("assets/icons/#{@icon_name}.svg") - end end end