Need help with routerprovider
Hey all,
I was trying to create a new project with refine with the basic CRA scheme, and am facing an issue where I can't add custom pages to the routerprovider. Basically, when I add the '/' path to the element 'LandingPage', it does not show the said element at that path.
Steps to reproduce the error:
1) Create a refine app using,
npm create refine-app@latest refine-setup
2) Without making any changes to the generated boilerplate, go to App.tsx and modify the routerProvider attribute of the Refine component as said in the documentation.
And, the LandingPage component does NOT appear on the '/' path. Please help me resolve this issue, and feel free to ask for the project configuration required to debug it.![No description](https://cdn.answeroverflow.com/1069531502716661790/image.png)
2 Replies
absent-sapphire•2y ago
Hey @hasnain-cyber,
/
route is also used by refine, you can pass DashboardPage
prop to render your page in /
, check out this https://refine.dev/docs/api-reference/core/components/refine-config/#dashboardpage
Btw, the page you're seeing is the WelcomePage
which is rendered because there are no resources definedplain-purple•2y ago
Ohh, thanks a lot, it worked 😌😌