AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

utils.ts 383B

123456789101112
  1. import type { InertiaLinkProps } from '@inertiajs/react';
  2. import { clsx } from 'clsx';
  3. import type { ClassValue } from 'clsx';
  4. import { twMerge } from 'tailwind-merge';
  5. export function cn(...inputs: ClassValue[]) {
  6. return twMerge(clsx(inputs));
  7. }
  8. export function toUrl(url: NonNullable<InertiaLinkProps['href']>): string {
  9. return typeof url === 'string' ? url : url.url;
  10. }