Only preload svg shapes on homepage

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-10-11 17:49:13 +02:00
parent 528744d765
commit 74581912f3
2 changed files with 10 additions and 3 deletions

View File

@@ -86,4 +86,9 @@ defmodule Mobilizon.Web.PageView do
def language_direction(assigns) do
assigns |> Map.get(:locale, "en") |> get_language_direction()
end
@spec is_root(map()) :: boolean()
def is_root(assigns) do
assigns |> Map.get(:conn, %{request_path: "/"}) |> Map.get(:request_path, "/") == "/"
end
end