@shopgate/engage
Version:
Shopgate's ENGAGE library.
6 lines • 573 B
JavaScript
import{OS_ANDROID,OS_IOS}from'@shopgate/pwa-common/constants/Device';/**
* Generates a review app deep link based on the given provider
* @param {string} bundleId app bundle id
* @param {OS_ANDROID | OS_IOS} platform the name of the platform
* @return {string | null}
*/export function generateReviewLink(bundleId,platform){if(!bundleId){return null;}switch(platform){case OS_IOS:{return"https://itunes.apple.com/app/id".concat(bundleId,"?action=write-review");}case OS_ANDROID:{return"https://market.android.com/details?id=".concat(bundleId);}default:{return null;}}}