init
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled

This commit is contained in:
Chief-spartan-117
2026-01-21 11:13:09 +05:45
commit 972264e361
188 changed files with 27498 additions and 0 deletions

18
resources/js/lib/utils.ts Normal file
View File

@@ -0,0 +1,18 @@
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;
}