Add tap-to-detail on swipe cards and fix color overlay alignment
- Add onTap callback to SwipeCard using useDrag's tap detection - Wire through SwipeReviewMode to open ListingDetailSheet on tap - Fix color overlay misalignment: add relative to card container so the absolute overlay positions within the rounded card, not the full-width outer wrapper
This commit is contained in:
parent
9c954c0e43
commit
eacdf24621
3 changed files with 14 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ interface SwipeReviewModeProps {
|
|||
onDecide: (listingId: number, decision: DecisionType, listingType?: 'RENT' | 'BUY') => void;
|
||||
onClear: (listingId: number, listingType?: 'RENT' | 'BUY') => void;
|
||||
onClose: () => void;
|
||||
onSelectListing?: (listingId: number) => void;
|
||||
getDecision: (listingId: number, listingType?: string) => DecisionType | undefined;
|
||||
}
|
||||
|
||||
|
|
@ -33,6 +34,7 @@ export function SwipeReviewMode({
|
|||
onDecide,
|
||||
onClear,
|
||||
onClose,
|
||||
onSelectListing,
|
||||
getDecision,
|
||||
}: SwipeReviewModeProps) {
|
||||
// Filter to only undecided features
|
||||
|
|
@ -128,6 +130,7 @@ export function SwipeReviewMode({
|
|||
key={feature.properties.url}
|
||||
feature={feature}
|
||||
onSwipe={handleSwipe}
|
||||
onTap={() => onSelectListing?.(getListingId(feature))}
|
||||
isTop={i === 0}
|
||||
stackIndex={i}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue