Spaces:
Sleeping
Sleeping
| import { clsx, type ClassValue } from "clsx" | |
| import { twMerge } from "tailwind-merge" | |
| export function cn(...inputs: ClassValue[]) { | |
| return twMerge(clsx(inputs)) | |
| } | |
| export function formatCurrency(value: number): string { | |
| return new Intl.NumberFormat("en-US", { | |
| style: "currency", | |
| currency: "USD", | |
| minimumFractionDigits: 0, | |
| maximumFractionDigits: 0, | |
| }).format(value); | |
| } | |
| export function formatDate(date: string | null | undefined): string { | |
| if (!date) return ""; | |
| return new Date(date).toLocaleDateString("en-US", { | |
| month: "short", | |
| day: "numeric", | |
| year: "numeric", | |
| }); | |
| } | |