chore: use verified routes in nav bar
This commit is contained in:
parent
8040c38edf
commit
2d81bf20ce
1 changed files with 8 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
|||
defmodule ComfycampWeb.NavBar do
|
||||
use Phoenix.Component
|
||||
use ComfycampWeb, :verified_routes
|
||||
|
||||
alias Comfycamp.Accounts.User
|
||||
|
||||
|
@ -15,26 +16,26 @@ defmodule ComfycampWeb.NavBar do
|
|||
def navbar(assigns) do
|
||||
~H"""
|
||||
<nav class="limiter navbar">
|
||||
<.link href="/">Главная</.link>
|
||||
<.link href="/blog/">Блог</.link>
|
||||
<.link href="/cinema/">Кинотеатр</.link>
|
||||
<.link href={~p"/"}>Главная</.link>
|
||||
<.link href={~p"/blog/"}>Блог</.link>
|
||||
<.link href={~p"/cinema/"}>Кинотеатр</.link>
|
||||
|
||||
<div class="space" />
|
||||
|
||||
<%= if @current_user do %>
|
||||
<.link href="/users/settings">
|
||||
<.link href={~p"/users/settings"}>
|
||||
Настройки
|
||||
</.link>
|
||||
|
||||
<.link href="/users/log_out" method="delete">
|
||||
<.link href={~p"/users/log_out"} method="delete">
|
||||
Выйти
|
||||
</.link>
|
||||
<% else %>
|
||||
<.link href="/users/register">
|
||||
<.link href={~p"/users/register"}>
|
||||
Зарегистрироваться
|
||||
</.link>
|
||||
|
||||
<.link href="/users/log_in">
|
||||
<.link href={~p"/users/log_in"}>
|
||||
Войти
|
||||
</.link>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue