-
I upgraded my project to refine version 4 and set up the routing by the resources are not showing on the sidebar even though the routes are working when i change in the browser. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @van-vince sorry for the issue! Are you using a custom If you're using the new You can replace the - import { useRouterContext } from "@refinedev/core";
+ import { useLink } from "@refinedev/core";
const CustomSider = () => {
- const { Link } = useRouterContext();
+ const Link = useLink();
/* ... */
} Let me know if this resolved the issue, if not can you give us a bit more info about the issue? Let's try to understand the issue. 🙏 |
Beta Was this translation helpful? Give feedback.
Hey @van-vince sorry for the issue!
Are you using a custom
<Sider>
component? Looks like an issue related to the router changes.If you're using the new
routerProvider
prop; you'll also need to update the usage ofuseRouterContext
hook, which is deprecated and only works with the legacy router providers.You can replace the
Link
usage fromuseRouterContext
with theuseLink
hook;Let me know if this resolved the issue, if not can you give us a bit more info about the issue? Let's …