defmodule LiveBeatsWeb.LiveHelpers do import Phoenix.LiveView import Phoenix.LiveView.Helpers alias LiveBeatsWeb.Router.Helpers, as: Routes alias Phoenix.LiveView.JS alias LiveBeats.Accounts alias LiveBeats.MediaLibrary def profile_path(%Accounts.User{} = current_user) do Routes.song_index_path(LiveBeatsWeb.Endpoint, :index, current_user.username) end def profile_path(%MediaLibrary.Profile{} = profile) do Routes.song_index_path(LiveBeatsWeb.Endpoint, :index, profile.username) end def flash(%{kind: :error} = assigns) do ~H""" <%= if live_flash(@flash, @kind) do %>
<%= live_flash(@flash, @kind) %>
<%= live_flash(@flash, @kind) %>
<%= render_slot(@inner_block) %>
<%= col.label %> | <% end %>
---|
<%= render_slot(col, row) %>
|
<% end %>
<%= col.label %> | <% end %>
---|