From d0426e208e46f4f468189f1dcc71ab6228f8237f Mon Sep 17 00:00:00 2001 From: KKlochko Date: Sun, 6 Apr 2025 21:33:04 +0300 Subject: [PATCH] Update the navbar to show user information, sign in and out buttons. --- .../components/my_partials/navbar.ex | 43 +++++++++++++++---- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/lib/decentralised_book_index_web/components/my_partials/navbar.ex b/lib/decentralised_book_index_web/components/my_partials/navbar.ex index a4b095d..1187349 100644 --- a/lib/decentralised_book_index_web/components/my_partials/navbar.ex +++ b/lib/decentralised_book_index_web/components/my_partials/navbar.ex @@ -1,6 +1,8 @@ defmodule DecentralisedBookIndexWeb.Components.MyPartials.Navbar do use Phoenix.Component use DecentralisedBookIndexWeb, :verified_routes + + import DecentralisedBookIndexWeb.Components.MyComponents.Buttons alias Phoenix.LiveView.JS attr :page_title, :string, required: true @@ -17,14 +19,7 @@ defmodule DecentralisedBookIndexWeb.Components.MyPartials.Navbar do DBI -
- Sign in - -
+ <.user_info current_user={@current_user} />