Header

Question: How to Add/Remove New NavLinks?

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

You can add or remove new links by modifying the data 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 three dashboards (admin, client, and affiliate) to facilitate development without multiple logins.

export const navLinks: {
    auth: {
        [key in roles]: {
            label: string;
            path: string;
            icon?: LucideIcon;
            mobile_label?: string;
        }[];
    };
    notAuth: {
        label: string;
        path: string;
    }[];
} = {
    auth: {
        ADMIN: [
            {
                label: "as an Admin",
                path: `${adminRoute}/dashboard`,
                mobile_label: "Admin Dashboard",
                icon: Icons.userCog,
            },
            {
                label: "as a Client",
                path: `${clientRoute}/dashboard`,
                mobile_label: "Client Dashboard",
                icon: Icons.user,
            },
            {
                label: "as an Affiliate",
                path: `${affiliateRoute}/dashboard`,
                mobile_label: "Affiliate Dashboard",
                icon: Icons.handshake,
            },
        ],
        CLIENT: [
            {
                label: "Dashboard",
                path: `${clientRoute}/dashboard`,
                mobile_label: "Dashboard",
            },
        ],
        AFFILIATE: [
            { ...............etc]}

Last updated