SaasCore Docs
  • Get Started
  • Configuration
    • Database
    • Stripe
      • Product ID and Price ID
      • API keys
      • Stripe Webhook
    • Emails
      • Cron Jobs
    • Claudinary
    • Chat plugin
    • Upstash Redis
    • OAuth with Google and GitHub
    • Subscription types and plans
    • Affiliate program
    • Google Analytics Api
  • Landing page
    • Header
    • Hero
      • Discount
      • AvatarCircles
    • Other components
  • Authentication Flow
    • For Admins
    • For Clients
      • OAuth
      • Credentials
    • For Affiliates
  • Payments
    • Payment Flow Scenarios
      • Scenario 1: Registered Client
      • Scenario 2: Direct Subscription from Home Page
      • Upgrading/Downgrading/Canceling Subscriptions
    • Pricing Table
  • Component Protection
  • Pending ...
Powered by GitBook
On this page
  1. Landing page

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]}
PreviousLanding pageNextHero

Last updated 10 months ago