export default function hotelProvider(providers) { const booking = providers ? providers.filter(provider => provider.id.includes("bdc") ) : []; const hostelworld = providers ? providers.filter(provider => provider.id.includes("hw") ) : []; if (booking.length) { return "bdc"; } else if (hostelworld.length) { return "hw"; } return null; }