equal-aqua
equal-aqua•3mo ago

Dashboard

How to add Dashboard to my custom sider ?
2 Replies
kapa.ai
kapa.ai•3mo ago
Hi @George Mohsen. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To add a Dashboard to your custom Sider in Refine, you can use the render property of the <Sider> component. The render property is a function that receives an object with the items and logout properties. The items property is the list of navigation items and the logout property is the logout button. Here is an example of how you can do this:
import { Layout, Sider } from "@refinedev/antd";

const CustomSider = () => {
return (
<Sider
render={({ items, logout }) => {
return (
<>
<a href="<https://refine.dev/">👋> Navigation Link</a>
{items}
{logout}
</>
);
}}
/>
);
};

const CustomLayout = () => {
return <Layout Sider={CustomSider}>...</Layout>;
};
import { Layout, Sider } from "@refinedev/antd";

const CustomSider = () => {
return (
<Sider
render={({ items, logout }) => {
return (
<>
<a href="<https://refine.dev/">👋> Navigation Link</a>
{items}
{logout}
</>
);
}}
/>
);
};

const CustomLayout = () => {
return <Layout Sider={CustomSider}>...</Layout>;
};
In this example, a custom navigation link is added to the Sider. You can replace the <a href="<https://refine.dev/">👋> Navigation Link</a> with your Dashboard component or link. For more information, you can refer to the Refine documentation (https://refine.dev/docs/guides-concepts/faq#using-render-property-of-sider-component). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai•3mo ago
<@1083046721392750612> kapa.ai is still learning and improving, please let us know how it did by reacting below