Skip to content

Commit

Permalink
fix: pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AfonsoMartins26 committed Oct 4, 2024
1 parent 6aa9b72 commit d973f50
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/atomic_web/components/socials.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
<div class="mt-4 flex gap-4">
<%= 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 %>
<div class="flex flex-row items-center gap-x-1">
Expand Down

0 comments on commit d973f50

Please sign in to comment.