Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 404 page does not work when a user opens a non-valid link without going to a valid one first #124

Closed
1 task done
jakubnowicki opened this issue Mar 21, 2023 · 0 comments · Fixed by #125
Closed
1 task done
Labels

Comments

@jakubnowicki
Copy link
Member

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Project Version

0.3.0

Platform and OS Version

No response

Existing Issues

No response

What happened?

404 page does not work when a user opens a non-valid link without going to a valid one first

Steps to reproduce

#Shiny Router 0.3.0 ----------
options(shiny.port = 3333)
install.packages("[email protected]") #Restart session if needed
library(shiny.router)
library(shiny)

router <- router_ui(
  route("/", shiny::tags$div(shiny::tags$span("Hello world"))),
  route("/main", shiny::tags$div(h1("Main page"), p("Lorem ipsum."))),
  page_404 = page404(tags$div(tags$h1("This is the 404 Page")))
)

shinyApp(
  router,
  function(input, output, session) {router_server()}
)

# 1. Visit http://localhost:3333/#!/non-existing-page directly (without ever visiting homepage) from your browser
# 2. Visit http://localhost:3333/#!/ first and then visit http://localhost:3333/#!/non-existing-page

Expected behavior

404 page is presented when a user opens a non-valid link.

Attachments

No response

Screenshots or Videos

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant