style: fix linting errors
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simon 2025-09-29 16:41:46 +02:00
parent d40bc0bb82
commit d10fcc3da1
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
7 changed files with 68 additions and 46 deletions

View file

@ -31,9 +31,10 @@ defmodule MvWeb.Layouts do
attr :flash, :map, required: true, doc: "the map of flash messages"
attr :current_user, :map, default: nil, doc: "the current user, if authenticated"
attr :current_scope, :map,
default: nil,
doc: "the current [scope](https://hexdocs.pm/phoenix/scopes.html)"
default: nil,
doc: "the current [scope](https://hexdocs.pm/phoenix/scopes.html)"
slot :inner_block, required: true
@ -52,7 +53,6 @@ defmodule MvWeb.Layouts do
"""
end
@doc """
Shows the flash group with standard titles and content.

View file

@ -6,7 +6,9 @@ defmodule MvWeb.Layouts.Navbar do
use Gettext, backend: MvWeb.Gettext
use MvWeb, :verified_routes
attr :current_user, :map, required: true, doc: "The current user - navbar is only shown when user is present"
attr :current_user, :map,
required: true,
doc: "The current user - navbar is only shown when user is present"
def navbar(assigns) do
~H"""

View file

@ -34,8 +34,10 @@ defmodule MvWeb.LiveUserAuth do
case socket.assigns do
%{current_user: %{} = user} ->
{:cont, assign(socket, :current_user, user)}
_ ->
{:halt, Phoenix.LiveView.redirect(socket, to: ~p"/sign-in")}
socket = Phoenix.LiveView.redirect(socket, to: ~p"/sign-in")
{:halt, socket}
end
end