-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add 404 pages for invalid links #23
Comments
For insights into what is happening, those pages above where 404 page does not work are because of dynamic data. We don't know if those pages are valid or not until we load the data, say games or puzzles or their variants from the server. There are two ways to handle it. One is with Vue Router where you would check the list of games returned from server to see if the route is valid or not. This method defeats the purpose of separations of concerns since you will be calling the API in Vue-Router. Say you will handle the issue in the concerned component instead. Then, you should either provide conditional rendering based on server return. Here, you can either conditionally show right in the component or forward the handling to 404 page. In the latter case, you would need to update 404 page to handle those redirects. In either cases, you somehow need to handle the unknown of whether the page does not work because of lack of games (or variants) or server fail. |
There is a default 404 page when a link doesn't exist.
Here are examples in which it works with:
The following pages do not display a 404 page when they should be:
Assignment: Fix the missing 404 pages. I recommend looking at vueRouter.ts
The text was updated successfully, but these errors were encountered: