Single resource config

How can I implement a category that only holds a single item of a resource? e.g: I'd like to have a 'Config' item in the left menu. Where a user can see their api key, re-generate it, configure a webhook url, etc. How could I do that?
4 Replies
kapa.ai
kapa.ai5mo ago
Hi @angelrs2670. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the Refine documentation (https://refine.dev/docs) for more information on how to configure resources and actions. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai5mo ago
<@343119484942549012> kapa.ai is still learning and improving, please let us know how it did by reacting below
extended-salmon
extended-salmon5mo ago
Hello @angelrs2670 it's no different than any other resource definition." You can do something like:
resources={
[
....,
{
name: "config",
list: "/config", // path for the page
}
]
}
resources={
[
....,
{
name: "config",
list: "/config", // path for the page
}
]
}
You can see a similar example here: https://github.com/refinedev/refine/blob/master/examples/blog-refine-daisyui/src/App.tsx
GitHub
refine/examples/blog-refine-daisyui/src/App.tsx at master · refined...
A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility. - refinedev/refine
metropolitan-bronze
metropolitan-bronze5mo ago
Thank you @batuhanw - I ended up figuring it out 👍