ratty-blush
ratty-blush13mo ago

DashboardPage only works with the legacy routing system. It will be removed in the next major releas

'DashboardPage' is deprecated.ts(6385) index.d.ts(80, 8): The declaration was marked as deprecated here. (property) RefineProps.DashboardPage?: React.FC<DashboardPageProps> | undefined A custom dashboard page can be passed to the DashboardPage prop which is accessible on root route. @type — [React.FC<DashboardPageProps>] (https://refine.dev/docs/api-reference/core/components/refine-config/#dashboardpage) @deprecated — Please use the DashboardPage component in your routes instead. No quick fixes available
| refine
`` component is the entry point of a refine app. It is where the highest level of configuration of the app occurs.
2 Replies
kapa.ai
kapa.ai13mo ago
Hi @jakshire01. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The DashboardPage prop in the <Refine> component is indeed deprecated in the newer versions of refine. This is due to changes in the routerProvider API of refine. Instead of using DashboardPage, you can now define an index route manually with your router package. Here's an example of how you can define a home page:
[
{
name: "dashboard", // name of the resource is not important for the `useBreadcrumb` hook
list: "/", // If any one of your resources has a list action with `/` route, the home icon will be rendered
}
]
[
{
name: "dashboard", // name of the resource is not important for the `useBreadcrumb` hook
list: "/", // If any one of your resources has a list action with `/` route, the home icon will be rendered
}
]
In earlier versions, the home icon in the Breadcrumb was created by the DashboardPage, but now it is rendered if you define an action route as / in any one of your resources. It will be rendered with the home icon regardless of the current route. You can also hide the home icon by setting showHome to false. For more details, you can refer to the useBreadcrumb documentation (https://refine.dev/docs/api-reference/core/hooks/useBreadcrumb). Sources: - Refine Config Documentation (https://refine.dev/docs/api-reference/core/components/refine-config/#dashboardpage) - Router Provider Migration Guide (https://refine.dev/docs/migration-guide/router-provider) - useBreadcrumb documentation (https://refine.dev/docs/api-reference/core/hooks/useBreadcrumb) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai13mo ago
<@418995770205929473> kapa.ai is still learning and improving, please let us know how it did by reacting below