Next.js Discord

Discord Forum

Static data storage

Answered
ABUL KALAM posted this in #help-forum
Open in Discord
Avatar
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
View full answer

7 Replies

Avatar
These links are to be diplayed like this
Image
Avatar
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
please mark solution
Avatar