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 use CanneryWeb, :live_component
alias Cannery.{Accounts} alias Cannery.{Accounts}
alias CanneryWeb.{HomeLive}
def mount(socket) do def mount(socket) do
{:ok, socket |> assign(results: [], title_content: nil)} {:ok, socket |> assign(results: [], title_content: nil)}

View File

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