Class: RobotLab::Web::Components::ErrorPage

Inherits:
Phlex::HTML
  • Object
show all
Defined in:
lib/robot_lab/web/components/error_page.rb

Overview

The 404 page body.

Instance Method Summary collapse

Constructor Details

#initialize(message:) ⇒ ErrorPage

Returns a new instance of ErrorPage.



8
9
10
# File 'lib/robot_lab/web/components/error_page.rb', line 8

def initialize(message:)
  @message = message
end

Instance Method Details

#view_templateObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/robot_lab/web/components/error_page.rb', line 12

def view_template
  h1 { "Not found" }
  p { @message }
  p do
    a(href: "/", class: "inline-flex items-center gap-1") do
      render PhlexIcons::Hero::ArrowLeft.new(class: "w-4 h-4")
      plain "Dashboard"
    end
  end
end