From d973f50dfbd75dc3527a8c6b8134f17f9144e682 Mon Sep 17 00:00:00 2001 From: Afonso Martins Date: Fri, 4 Oct 2024 01:22:20 +0100 Subject: [PATCH] fix: pass tests --- lib/atomic_web/components/socials.ex | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/atomic_web/components/socials.ex b/lib/atomic_web/components/socials.ex index d1f0779a..f026a074 100644 --- a/lib/atomic_web/components/socials.ex +++ b/lib/atomic_web/components/socials.ex @@ -3,17 +3,15 @@ defmodule AtomicWeb.Components.Socials do use Phoenix.Component def socials(assigns) do - social_links = [ - {:tiktok, "tiktok.svg", "https://tiktok.com/"}, - {:instagram, "instagram.svg", "https://instagram.com/"}, - {:facebook, "facebook.svg", "https://facebook.com/"}, - {:x, "x.svg", "https://x.com/"} - ] - ~H""" <%= if @entity.socials do %>
- <%= for {social, icon, url_base} <- social_links do %> + <%= for {social, icon, url_base} <- [ + {:tiktok, "tiktok.svg", "https://tiktok.com/"}, + {:instagram, "instagram.svg", "https://instagram.com/"}, + {:facebook, "facebook.svg", "https://facebook.com/"}, + {:x, "x.svg", "https://x.com/"} + ] do %> <% social_value = Map.get(@entity.socials, social) %> <%= if social_value do %>