- Added credit cost tracking to AI image nodes, displaying the cost in Euro-Cent. - Updated prompt node to create edges between prompt and AI image nodes during image generation. - Enhanced Convex action to include credit cost in image generation data handling. - Introduced utility function for formatting Euro-Cent values for better user display.
15 lines
401 B
TypeScript
15 lines
401 B
TypeScript
import { clsx, type ClassValue } from "clsx"
|
|
import { twMerge } from "tailwind-merge"
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs))
|
|
}
|
|
|
|
/** Credits / Preise: Werte sind Euro-Cent (siehe PRD, Manifest). */
|
|
export function formatEurFromCents(cents: number) {
|
|
return new Intl.NumberFormat("de-DE", {
|
|
style: "currency",
|
|
currency: "EUR",
|
|
}).format(cents / 100)
|
|
}
|