* initial commit * format links right jobops.dakheera47.com/cv/shaheer-google-de * don't support legacy * remove phishing look * smaller links * readiness check in settings * rework UX * right col * pop a modal * modal improvements * show links * documentation disclaimer * fix(tracer-links): preserve descriptive resume link labels * fix(tracer-links): classify bot user agents before browser families * fix(tracer-links): reject non-http redirect destinations * fix(tracer-redirect): disable caching for tracked redirects * fix(origin): prefer canonical public base url over forwarded headers * fix(auth): protect tracer analytics routes behind basic auth * fix(ui): rename misleading tracer drilldown human metric * style(tests): format tracer-links invalid-destination assertion * fix(tests): prevent mocked fs from breaking sqlite data-dir resolution * style(docs): format versioned docs json for biome * fix(tests): mock tracer-links in pdf skills validation suite
59 lines
1.2 KiB
TypeScript
59 lines
1.2 KiB
TypeScript
import {
|
|
Columns3,
|
|
Home,
|
|
Inbox,
|
|
LayoutDashboard,
|
|
Link2,
|
|
Settings,
|
|
Shield,
|
|
} from "lucide-react";
|
|
|
|
export type NavLink = {
|
|
to: string;
|
|
label: string;
|
|
icon: typeof Home;
|
|
activePaths?: string[];
|
|
};
|
|
|
|
export const NAV_LINKS: NavLink[] = [
|
|
{ to: "/overview", label: "Overview", icon: Home },
|
|
{
|
|
to: "/jobs/ready",
|
|
label: "Jobs",
|
|
icon: LayoutDashboard,
|
|
activePaths: [
|
|
"/jobs/ready",
|
|
"/jobs/discovered",
|
|
"/jobs/applied",
|
|
"/jobs/all",
|
|
],
|
|
},
|
|
{
|
|
to: "/applications/in-progress",
|
|
label: "In Progress",
|
|
icon: Columns3,
|
|
activePaths: ["/applications/in-progress"],
|
|
},
|
|
{ to: "/tracking-inbox", label: "Tracking Inbox", icon: Inbox },
|
|
{
|
|
to: "/tracer-links",
|
|
label: "Tracer Links",
|
|
icon: Link2,
|
|
activePaths: ["/tracer-links"],
|
|
},
|
|
{ to: "/visa-sponsors", label: "Visa Sponsors", icon: Shield },
|
|
{ to: "/settings", label: "Settings", icon: Settings },
|
|
];
|
|
|
|
export const isNavActive = (
|
|
pathname: string,
|
|
to: string,
|
|
activePaths?: string[],
|
|
) => {
|
|
if (pathname === to) return true;
|
|
if (!activePaths) return false;
|
|
return activePaths.some(
|
|
(path) => pathname === path || pathname.startsWith(`${path}/`),
|
|
);
|
|
};
|