DirectoryEasy
  • Non-developers
    • Setting Up Your Development Environment
    • Setting Up GitHub
    • Vercel Deployment
    • Domain Setup
  • Developers
    • Get Started
    • Configuration
      • Main
      • Database
      • Sections and categories
      • Emails
        • Cron Jobs
      • Claudinary
      • Upstash Redis
      • OAuth with Google and GitHub
      • Google Analytics Api
      • Stripe
        • API keys
        • Stripe Webhook
      • AI
    • Landing page
      • Header
Powered by GitBook
On this page
  1. Developers
  2. Landing page

Header

Question: How to Add/Remove New NavLinks?

Head to : app/components/Header/links.ts

You can add or remove new links by modifying the links file. Note that the links visible can vary based on user roles—each role may see different links. For example, the admin has access to two dashboards (admin and client) to facilitate development without multiple logins.

export const navLinks: {
    auth: {
        [key in roles]: NavLink[];
    };
    notAuth: NavLink[];
} = {
    auth: {
        ADMIN: [
            {
                label: "as an Admin",
                path: `${adminRoute}/items`,
                mobile_label: "Admin Dashboard",
                icon: Icons.userCog,
            },
            {
                label: "as a Client",
                path: `${clientRoute}/my-items`,
                mobile_label: "Client Dashboard",
                icon: Icons.user,
            },
        ],
        CLIENT: [
            {
                label: "Dashboard",
                path: `${clientRoute}/my-items`,
                mobile_label: "Dashboard",
            },
        ],
    },
    notAuth: filterSignUpOption([
        {
            label: "Log in",
            path: `${authRoute}/sign-in`,
        },
        {
            label: "Sign up",
            path: `${authRoute}/sign-up`,
        },
    ]),
};
PreviousLanding page

Last updated 7 months ago