1
0
Fork 0

feat(products): add thumbnail_url and image util

This commit is contained in:
Henrik Hautakoski 2026-04-29 21:50:38 +02:00
parent 200193a999
commit 798f170989
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1,4 @@
import { getApiBaseUrl } from "./base";
export const imageUrl = (path : string) =>
(new URL(`/image/${path}`, getApiBaseUrl())).toString();

View file

@ -12,6 +12,7 @@ export interface Product {
sku: string; sku: string;
short_description: string | null; short_description: string | null;
description: string | null; description: string | null;
thumbnail_url: string | null;
price: string; price: string;
stock_quantity: number; stock_quantity: number;
active: boolean; active: boolean;