- if policy(@profile).edit?
.contain
= link_to 'Edit', edit_profile_path(@profile)
%p
= @profile.name
%p
= @profile.summary
.social-links
-# = "".html_safe
%p
- @profile.social_links.each do |social_link|
- case social_link.url
- when /twitter\.com/, /x\.com/
- social_icon = ""
-# = link_to "#{social_icon} #{social_link.url}".html_safe, "https://#{social_link.url}"
= link_to "https://#{social_link.url}" do
#{social_icon.try("html_safe") || "🌐"}
- if policy(@profile).edit?
%br= link_to '+ Add Social Link', new_social_link_path(profile_id: @profile.id)
%h2 About #{@profile.name}
.about
= @profile.about