diff --git a/lib/cannery_web/components/container_card.ex b/lib/cannery_web/components/container_card.ex index ce9bfd27..ba6cec2c 100644 --- a/lib/cannery_web/components/container_card.ex +++ b/lib/cannery_web/components/container_card.ex @@ -5,7 +5,7 @@ defmodule CanneryWeb.Components.ContainerCard do use CanneryWeb, :component import CanneryWeb.Components.TagCard - alias Cannery.{Repo, Containers} + alias Cannery.{Containers, Repo} alias CanneryWeb.Endpoint def container_card(%{container: container} = assigns) do diff --git a/lib/cannery_web/live/container_live/edit_tags_component.ex b/lib/cannery_web/live/container_live/edit_tags_component.ex index af871ad2..103757b5 100644 --- a/lib/cannery_web/live/container_live/edit_tags_component.ex +++ b/lib/cannery_web/live/container_live/edit_tags_component.ex @@ -4,7 +4,7 @@ defmodule CanneryWeb.ContainerLive.EditTagsComponent do """ use CanneryWeb, :live_component - alias Cannery.{Accounts.User, Containers, Containers.Container, Tags, Tags.Tag, Repo} + alias Cannery.{Accounts.User, Containers, Containers.Container, Repo, Tags, Tags.Tag} alias Phoenix.LiveView.Socket @impl true diff --git a/lib/cannery_web/live/home_live.ex b/lib/cannery_web/live/home_live.ex index ba8bdc4e..4d4dc55c 100644 --- a/lib/cannery_web/live/home_live.ex +++ b/lib/cannery_web/live/home_live.ex @@ -9,7 +9,13 @@ defmodule CanneryWeb.HomeLive do @impl true def mount(_params, session, socket) do admins = Accounts.list_users_by_role(:admin) - {:ok, socket |> assign_defaults(session) |> assign(query: "", results: %{}, admins: admins)} + + socket = + socket + |> assign_defaults(session) + |> assign(page_title: "Home", query: "", results: %{}, admins: admins) + + {:ok, socket} end @impl true diff --git a/lib/cannery_web/templates/layout/root.html.heex b/lib/cannery_web/templates/layout/root.html.heex index a3705ef3..c45c333c 100644 --- a/lib/cannery_web/templates/layout/root.html.heex +++ b/lib/cannery_web/templates/layout/root.html.heex @@ -5,7 +5,11 @@ <%= csrf_meta_tag() %> - <%= live_title_tag(assigns[:page_title], suffix: " | Cannery") %> + <%= if(assigns |> Map.has_key?(:page_title), + do: "#{assigns.page_title} | Cannery", + else: "Cannery" + ) + |> live_title_tag(suffix: "") %>