Skip to content

Commit bda2262

Browse files
committed
Add admin page
1 parent 452a2ac commit bda2262

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
defmodule PasswordExampleWeb.AdminLive do
2+
use PasswordExampleWeb, :live_view
3+
alias PasswordExampleWeb.UsersTableComponent
4+
end
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<h1>Admin</h1>
2+
3+
<%= live_component @socket, UsersTableComponent, id: :users_table %>

lib/password_example_web/router.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ defmodule PasswordExampleWeb.Router do
2828
get "/show", LoginController, :show
2929

3030
live "/hack", HackLive, :index
31+
live "/admin", AdminLive, :index
3132
end
3233

3334
# Other scopes may use custom stacks.

0 commit comments

Comments
 (0)