Skip to content

Commit

Permalink
Update additional-pages.md
Browse files Browse the repository at this point in the history
Add missing `use` in example
  • Loading branch information
leandrocp authored Nov 14, 2024
1 parent 6fa9b6e commit 14520f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion guides/recipes/additional-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Admin pages must use the `Beacon.LiveAdmin.PageBuilder` module, which provides t

```elixir
defmodule MyAppWeb.Admin.DocumentsLive.Index do
use Beacon.LiveAdmin.PageBuilder

@impl true
def menu_link(_prefix, _live_action), do: {:root, "Documents"}

Expand All @@ -43,4 +45,4 @@ defmodule MyAppWeb.Admin.DocumentsLive.Index do
end
```

You'll notice the only different from a regular LiveView is the `menu_link/2` callback, which is used to define the menu item for the page.
You'll notice the only different from a regular LiveView is the `menu_link/2` callback, which is used to define the menu item for the page.

0 comments on commit 14520f0

Please sign in to comment.