first commit
This commit is contained in:
11
laravel/resources/js/lib/utils.ts
Normal file
11
laravel/resources/js/lib/utils.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { 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 toUrl(url: NonNullable<InertiaLinkProps['href']>): string {
|
||||
return typeof url === 'string' ? url : url.url;
|
||||
}
|
||||
Reference in New Issue
Block a user