defmodule LokalWeb.Components.Topbar do @moduledoc """ Phoenix.Component for rendering an interactive topbar Assign """ use LokalWeb, :component alias LokalWeb.PageLive def topbar(assigns) do assigns = %{results: [], title_content: nil, current_user: nil, flash: nil} |> Map.merge(assigns) ~H"""
<%= if @flash && @flash |> Map.has_key?(:info) do %> <% end %> <%= if @flash && @flash |> Map.has_key?(:error) do %> <% end %>
""" end end