mirror of
https://github.com/bartvdbraak/hellob.art.git
synced 2025-04-26 09:01:21 +00:00
21 lines
497 B
TypeScript
21 lines
497 B
TypeScript
import { ClassValue, clsx } from "clsx";
|
|
import { twMerge } from "tailwind-merge";
|
|
|
|
import { env } from "@/env.mjs";
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs));
|
|
}
|
|
|
|
export function formatDate(input: string | number): string {
|
|
const date = new Date(input);
|
|
return date.toLocaleDateString("en-US", {
|
|
month: "long",
|
|
day: "numeric",
|
|
year: "numeric",
|
|
});
|
|
}
|
|
|
|
export function absoluteUrl(path: string) {
|
|
return `${env.NEXT_PUBLIC_APP_URL}${path}`;
|
|
}
|