From d35554ee0ed25b47637b527b5b24ce88248c3e52 Mon Sep 17 00:00:00 2001 From: Chris McCord Date: Mon, 22 Nov 2021 13:04:05 -0500 Subject: [PATCH] Link logo placeholder --- lib/live_beats_web/live/live_helpers.ex | 3 +++ .../templates/layout/live.html.heex | 20 +++++++++++-------- lib/live_beats_web/views/layout_view.ex | 4 ++-- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/lib/live_beats_web/live/live_helpers.ex b/lib/live_beats_web/live/live_helpers.ex index 7a39efc..943a3df 100644 --- a/lib/live_beats_web/live/live_helpers.ex +++ b/lib/live_beats_web/live/live_helpers.ex @@ -8,6 +8,9 @@ defmodule LiveBeatsWeb.LiveHelpers do alias LiveBeats.Accounts alias LiveBeats.MediaLibrary + def home_path(nil = _current_user), do: "/" + def home_path(%Accounts.User{} = current_user), do: profile_path(current_user) + def profile_path(current_user_or_profile, action \\ :index) def profile_path(%Accounts.User{} = current_user, action) do diff --git a/lib/live_beats_web/templates/layout/live.html.heex b/lib/live_beats_web/templates/layout/live.html.heex index 47db836..f7cc7c7 100644 --- a/lib/live_beats_web/templates/layout/live.html.heex +++ b/lib/live_beats_web/templates/layout/live.html.heex @@ -18,10 +18,12 @@
- <.icon name={:status_online} class="w-8 h-8 text-purple-600" outlined/> - - LiveBeats - + <.link redirect_to={home_path(@current_user)}> + <.icon name={:status_online} class="w-8 h-8 text-purple-600 -mt-2 inline-block" outlined/> + + LiveBeats + +