2022-10-26 13:18:06 +00:00
|
|
|
import { ClassValue, clsx } from "clsx"
|
|
|
|
|
import { twMerge } from "tailwind-merge"
|
|
|
|
|
|
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
|
|
|
return twMerge(clsx(inputs))
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-21 08:40:10 +00:00
|
|
|
export function formatDate(input: string | number): string {
|
2022-10-26 13:18:06 +00:00
|
|
|
const date = new Date(input)
|
|
|
|
|
return date.toLocaleDateString("en-US", {
|
|
|
|
|
month: "long",
|
|
|
|
|
day: "numeric",
|
|
|
|
|
year: "numeric",
|
|
|
|
|
})
|
|
|
|
|
}
|
2022-11-21 08:40:10 +00:00
|
|
|
|
|
|
|
|
export function absoluteUrl(path: string) {
|
2022-11-21 14:46:49 +00:00
|
|
|
return `${process.env.NEXT_PUBLIC_APP_URL}${path}`
|
2022-11-21 08:40:10 +00:00
|
|
|
}
|