Skip to content

Commit 0582eae

Browse files
committed
replace NotFoundComponent with a heex template
1 parent d0741d2 commit 0582eae

File tree

3 files changed

+235
-259
lines changed

3 files changed

+235
-259
lines changed

lib/algora_web/components/not_found_component.ex

Lines changed: 0 additions & 243 deletions
This file was deleted.

lib/algora_web/controllers/error_html.ex

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
defmodule AlgoraWeb.ErrorHTML do
22
use AlgoraWeb, :html
3-
alias AlgoraWeb.Component.NotFoundComponent
43

5-
# If you want to customize your error pages,
6-
# uncomment the embed_templates/1 call below
7-
# and add pages to the error directory:
8-
#
9-
# * lib/algora_web/controllers/error_html/404.html.heex
10-
# * lib/algora_web/controllers/error_html/500.html.heex
11-
#
12-
# embed_templates "error_html/*"
4+
embed_templates "error_html/*"
135

14-
def render("404.html", assigns) do
15-
NotFoundComponent.not_found(assigns)
16-
end
17-
18-
# The default is to render a plain text page based on
19-
# the template name. For example, "404.html" becomes
20-
# "Not Found".
216
def render(template, _assigns) do
227
Phoenix.Controller.status_message_from_template(template)
238
end

0 commit comments

Comments
 (0)