nextui/apps/docs/utils/links.ts
2023-06-13 18:29:03 -03:00

3 lines
120 B
TypeScript

export const isActive = (pathname: string | undefined | null, href: string) =>
pathname && pathname.startsWith(href);