AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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. }