Files
Chief-spartan-117 972264e361
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
init
2026-01-21 11:13:09 +05:45

19 lines
542 B
TypeScript

import { InertiaLinkProps } from '@inertiajs/react';
import { type ClassValue, clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export function isSameUrl(
url1: NonNullable<InertiaLinkProps['href']>,
url2: NonNullable<InertiaLinkProps['href']>,
) {
return resolveUrl(url1) === resolveUrl(url2);
}
export function resolveUrl(url: NonNullable<InertiaLinkProps['href']>): string {
return typeof url === 'string' ? url : url.url;
}