Skip to content

Commit

Permalink
Properly scope lookbook routes (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron committed Dec 9, 2022
1 parent 219f5ef commit 2c73c2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/small-clouds-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

Properly scope Lookbook routes
4 changes: 3 additions & 1 deletion demo/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
post "/example_check/ok", to: "auto_check#ok", as: :example_check_ok
post "/example_check/error", to: "auto_check#error", as: :example_check_error
post "/example_check/random", to: "auto_check#random", as: :example_check_random
end

mount Lookbook::Engine, at: "/lookbook" if defined?(Lookbook)
scope path: Rails.env.production? ? "/view-components/lookbook/" : "/lookbook" do
mount Lookbook::Engine, at: "/" if defined?(Lookbook)
end
end

0 comments on commit 2c73c2f

Please sign in to comment.