Static data storage
Answered
ABUL KALAM posted this in #help-forum
![Avatar](https://cdn.discordapp.com/avatars/563230508704858132/7600265f27e4ea1b089b54be0ff265aa.webp?size=256)
ABUL KALAMOP
Where should i put static data like these dashboard links?
const linksCategories = [
{
title: "uploads",
name: "uploads",
},
{
title: "group chats",
name: "groupChats",
},
{
title: "members",
name: "members",
},
{
title: "teams & others",
name: "teamsAndOthers",
},
];
const linksData = {
uploads: [
{ text: "projects", href: "/admin/projects" },
{ text: "blogs", href: "/admin/blogs" },
{ text: "custom rates", href: "/admin/custom-rates" },
{ text: "product rates", href: "/admin/product-rates" },
],
groupChats: [
{ text: "client groups", href: "/admin/client-groups" },
{ text: "customer support", href: "/admin/customer-support" },
],
members: [
{ text: "clients", href: "/admin/clients" },
{ text: "users", href: "/admin/users" },
],
teamsAndOthers: [
{
text: "roles, analytics & cities",
href: "/admin/roles-analytics-cities",
},
{ text: "team, about us & banner", href: "/admin/team-aboutus-banner" },
],
};
Answered by B33fb0n3
next itself don't have an opinion about that. So you can put it whereever you want to. I prefer putting it next to my component in the specific route. Like that you can group your data and find everything on one view 👠@ABUL KALAM
7 Replies
![Avatar](https://cdn.discordapp.com/avatars/563230508704858132/7600265f27e4ea1b089b54be0ff265aa.webp?size=256)
ABUL KALAMOP
These links are to be diplayed like this
![Image](https://cdn.discordapp.com/attachments/1192491835659132949/1192491976185090159/image.png?ex=65a945b2&is=6596d0b2&hm=f2a1aaea5f912f9f064f3cbd62ab414a7918ebc034d72adac78cab37c3cca8f7&)
![Avatar](https://cdn.discordapp.com/avatars/301376057326567425/788b75eb8862277af3d31d317ada783f.webp?size=256)
B33fb0n3
next itself don't have an opinion about that. So you can put it whereever you want to. I prefer putting it next to my component in the specific route. Like that you can group your data and find everything on one view 👠@ABUL KALAM
Answer
![Avatar](https://cdn.discordapp.com/avatars/301376057326567425/788b75eb8862277af3d31d317ada783f.webp?size=256)
B33fb0n3
please mark solution
![Avatar](https://cdn.discordapp.com/avatars/301376057326567425/788b75eb8862277af3d31d317ada783f.webp?size=256)
B33fb0n3
![Avatar](https://cdn.discordapp.com/avatars/769111741098622976/a00ea6fb13337fd9ef76154f8e3cb990.webp?size=256)
Eric Burel
the only problem you may have is if they end up in the client bundle
if you use them in a React Server Component, they are rendered directly as HTML, the end user will never see the JSON
but anyway for a small subset of data like the links you show it's ok to send them client-side too, not a big deal