Files
old-new-wiaas/frontend/src/helpers/PackageHelper.js

16 lines
435 B
JavaScript
Raw Normal View History

2018-08-26 15:41:08 +02:00
const DEFAULT_PACKAGE_IMG = 'static/img/no-photo-package.jpg';
export const fromWCPackage = wcPackage => {
return {
id: wcPackage.id,
reference: wcPackage.slug,
image: wcPackage.images[0].src || DEFAULT_PACKAGE_IMG,
name: wcPackage.name,
country: 'Sweden',
countryCode: 'se',
currency: 'SEK',
documents: [],
shortDescription: wcPackage.description,
}
};