Skip to content

Commit

Permalink
Fix sidebar nags
Browse files Browse the repository at this point in the history
Hide sidebar when `active_tab` is nil. This has the effect of making our login and register pages look normal. This is the behavior we're looking for.
  • Loading branch information
w0rd-driven committed Jan 17, 2023
1 parent 8dd1f47 commit df54b86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/beatseek_web/components/layouts.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule BeatseekWeb.Layouts do

def sidebar(assigns) do
~H"""
<div class="w-1/3 max-w-xs p-4">
<div :if={!is_nil(@active_tab)} class="w-1/3 max-w-xs p-4">
<ul class="flex flex-col w-full sticky top-0">
<li class="my-px">
<span class="flex font-bold text-md text-primary-900 px-4 mt-2 mb-4 uppercase">Music</span>
Expand Down Expand Up @@ -85,7 +85,7 @@ defmodule BeatseekWeb.Layouts do
</li>
<li class="my-px">
<.link
navigate={~p"/users/log_out"}
href={~p"/users/log_out"}
method="delete"
class="group flex flex-row items-center h-12 px-4 rounded-lg text-primary-600 hover:bg-primary-100"
>
Expand Down

0 comments on commit df54b86

Please sign in to comment.