glcvdv-lite-api-map
Version:
A lightweight API for interactive hotel maps with Mapbox integration
10 lines • 691 B
JavaScript
export const generateWhitelabelUrl = (hotel, options = { language: 'EN', currency: 'EUR' }) => {
const params = {
checkin: new Date().toISOString().split('T')[0], // Today
checkout: new Date(new Date().setDate(new Date().getDate() + 1)).toISOString().split('T')[0], // Tomorrow
rooms: 1,
adults: 2,
};
return `https://whitelabel.nuitee.link/hotels/${hotel.id}?placeId=${hotel.placeId}=&checkin=${params.checkin}&checkout=${params.checkout}&rooms=${params.rooms}&adults=${params.adults}&name=${hotel.locality}&language=${options.language.toLowerCase()}¤cy=${options.currency}&children=`;
};
//# sourceMappingURL=generate-whitelabel-url.js.map