Initial commit

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F22Ms5Cxam5UHyxaCrtZzu
This commit is contained in:
Rami Bitar
2026-07-29 11:02:40 -04:00
co-authored by Claude Fable 5
commit f23332e42c
88 changed files with 7947 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { formatMoney, type MoneyV2 } from "@shopify/hydrogen";
/**
* App wrapper around Hydrogen's `formatMoney()` (`hydrogen-money` skill).
* Keeps locale and display options consistent. Never build money strings by
* concatenation and never compute totals client-side.
*
* This storefront is single-market (US/EN), so `en-US` is the correct locale.
* Market-aware stores would pass the active market locale instead.
*/
export function formatPrice(money: MoneyV2, locale = "en-US"): string {
return formatMoney(money, { locale }).toString();
}
/** Format a price range from min/max `MoneyV2` values. */
export function formatPriceRange(min: MoneyV2, max: MoneyV2, locale = "en-US"): string {
return formatMoney([min, max], { locale }).toString();
}