hide topbar search

This commit is contained in:
shibao 2021-09-10 21:42:05 -04:00 committed by oliviasculley
parent c0a8eb642e
commit 4dce597375
2 changed files with 7 additions and 6 deletions

View File

@ -2,7 +2,6 @@ defmodule CanneryWeb.Live.Component.Topbar do
use CanneryWeb, :live_component
alias Cannery.{Accounts}
alias CanneryWeb.{HomeLive}
def mount(socket) do
{:ok, socket |> assign(results: [], title_content: nil)}

View File

@ -13,7 +13,7 @@
</div>
<ul class="flex flex-row flex-wrap justify-center items-center
text-lg space-x-4 text-lg text-white">
space-x-4 text-lg text-white">
<%# user settings %>
<%= if @current_user do %>
<li>
@ -41,15 +41,17 @@
<% end %>
<%# search %>
<form phx-change="suggest" phx-submit="search">
<%#
<form phx-change="suggest" phx-submit="search" phx-target="<%= @myself %#>">
<input type="text" name="q" class="input input-primary"
placeholder="Search" list="results" autocomplete="off"/>
<datalist id="results">
<%= for {app, _vsn} <- @results do %>
<option value="<%= app %>"><%= app %></option>
<% end %>
<%= for {app, _vsn} <- @results do %#>
<option value="<%= app %#>"><%= app %#></option>
<% end %#>
</datalist>
</form>
%>
<li>
<%= link @current_user.email, class: "hover:underline",