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`,
        },
    ]),
};

Last updated