getting 404 error when clicked on create button on refine client dashboard page add property
getting 404 error when clicked on create button on refine client dashboard page add property
2 Replies
Hi @jakshire01. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
If you're getting a 404 error when clicking the create button on your refine client dashboard, it might be due to how your routing is set up. In Refine, when components are used to define the resource actions, default paths will be used. You can override the default paths by assigning an object with
component
and path
properties to the action properties. The default paths are:
- list
: /resources
- create
: /resources/create
- edit
: /resources/edit/:id
- show
: /resources/show/:id
If you're using a custom router like Next.js or Remix, you might need to set up a catch-all route to handle undefined routes. Here's an example for Next.js:
And here's an example for Remix:
Please ensure that you have defined the create
action in your resources
array. If you have already done this and you're still getting a 404 error, it might be due to your routing setup.
For more information, you can refer to the source (https://discord.com/channels/837692625737613362/1142228537416368169).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@418995770205929473> kapa.ai is still learning and improving, please let us know how it did by reacting below