Add package bundles
This commit is contained in:
16
frontend/src/helpers/PackageHelper.js
Normal file
16
frontend/src/helpers/PackageHelper.js
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
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,
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user