Add customize-screen shop preview and purchase flow.

Locked items can be previewed on the pet from the editor, purchased with points in the preview modal, and opened in the full customize view from the shop.
This commit is contained in:
2026-05-24 05:05:46 -06:00
parent 5d80b60247
commit 3470d444b4
7 changed files with 260 additions and 31 deletions

View File

@@ -94,3 +94,10 @@ function getDefaultPriceForLayer(layerId: ShopLayerId, variantId: string) {
export function getLayerLabel(layerId: ShopLayerId) {
return CHARACTER_LAYERS.find((layer) => layer.id === layerId)?.label ?? layerId;
}
export function findShopItemById(
items: readonly ShopItemRecord[],
itemId: string,
): ShopItemRecord | undefined {
return items.find((item) => item.id === itemId);
}