mirror of
https://github.com/velocitatem/PHANTOM.git
synced 2026-06-01 00:53:36 +00:00
trackion of date index searching
This commit is contained in:
@@ -24,19 +24,20 @@ interface Flight {
|
||||
fareRule: FareRule;
|
||||
refundable: boolean;
|
||||
basePrice: number;
|
||||
dateIndex?: number;
|
||||
}
|
||||
|
||||
export default function AirlineCard({ flight }: { flight: Flight }) {
|
||||
const durationRef = useHoverTracking({
|
||||
eventName: 'hover_over_title',
|
||||
productId: flight.id,
|
||||
metadata: { elementText: flight.duration },
|
||||
metadata: { elementText: flight.duration, dateIndex: flight.dateIndex },
|
||||
});
|
||||
|
||||
const priceRef = useHoverTracking({
|
||||
eventName: 'hover_over_paragraph',
|
||||
productId: flight.id,
|
||||
metadata: { elementText: 'price' },
|
||||
metadata: { elementText: 'price', dateIndex: flight.dateIndex },
|
||||
});
|
||||
|
||||
const handleCardClick = () => {
|
||||
@@ -44,6 +45,7 @@ export default function AirlineCard({ flight }: { flight: Flight }) {
|
||||
cabinClass: flight.cabinClass,
|
||||
fareRule: flight.fareRule,
|
||||
price: flight.basePrice,
|
||||
dateIndex: flight.dateIndex,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -39,13 +39,13 @@ export default function HotelCard({ hotel }: { hotel: Hotel }) {
|
||||
const titleRef = useHoverTracking({
|
||||
eventName: 'hover_over_title',
|
||||
productId: hotel.id,
|
||||
metadata: { elementText: hotel.name },
|
||||
metadata: { elementText: hotel.name, dateIndex: hotel.dateIndex },
|
||||
});
|
||||
|
||||
const priceRef = useHoverTracking({
|
||||
eventName: 'hover_over_paragraph',
|
||||
productId: hotel.id,
|
||||
metadata: { elementText: 'price' },
|
||||
metadata: { elementText: 'price', dateIndex: hotel.dateIndex },
|
||||
});
|
||||
|
||||
const handleCardClick = () => {
|
||||
@@ -53,6 +53,7 @@ export default function HotelCard({ hotel }: { hotel: Hotel }) {
|
||||
roomType: hotel.roomType,
|
||||
price: hotel.pricePerNight,
|
||||
nights: hotel.nights,
|
||||
dateIndex: hotel.dateIndex,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ export interface Hotel {
|
||||
roomType: string;
|
||||
checkIn: string;
|
||||
checkOut: string;
|
||||
dateIndex: number;
|
||||
amenities: string[];
|
||||
refundable: boolean;
|
||||
pricePerNight: number;
|
||||
@@ -39,6 +40,7 @@ export const transformProduct = (p: HotelProduct): Hotel => {
|
||||
roomType: room_type,
|
||||
checkIn: checkIn.toLocaleDateString('en-US', { month: 'short', day: 'numeric' }),
|
||||
checkOut: checkOut.toLocaleDateString('en-US', { month: 'short', day: 'numeric' }),
|
||||
dateIndex: date_index,
|
||||
amenities: metadata?.amenities || [],
|
||||
refundable: metadata?.refundable || false,
|
||||
pricePerNight: metadata?.base_price || 100,
|
||||
|
||||
Reference in New Issue
Block a user