Merged in fix/SW-1041-design-feedback-select-hotel (pull request #986)
fix(SW-1041): fix UI design feedback * fix(SW-1041): fix UI design feedback * fix(SW-1041): small fix * fix(SW-1041): add filter and sort badge * fix(SW-1041): update activefilter when entering map view * fix(SW-1041): create hook with activefilters * fix(SW-1041): hook only sets filter * fix(SW-1041): fix padding breadcrumbs * fix(SW-1041): rename hook * fix(SW-1041): fix double scroll Approved-by: Pontus Dreij Approved-by: Niclas Edenvin
This commit is contained in:
@@ -20,6 +20,10 @@ export default function FullView({
|
||||
currentIndex,
|
||||
totalImages,
|
||||
}: FullViewProps) {
|
||||
function handleSwipe(offset: number) {
|
||||
if (offset > 30) onPrev()
|
||||
if (offset < -30) onNext()
|
||||
}
|
||||
return (
|
||||
<div className={styles.fullViewContainer}>
|
||||
<Button
|
||||
@@ -53,6 +57,8 @@ export default function FullView({
|
||||
exit={{ opacity: 0, x: -300 }}
|
||||
transition={{ duration: 0.3 }}
|
||||
className={styles.fullViewImage}
|
||||
drag="x"
|
||||
onDragEnd={(e, info) => handleSwipe(info.offset.x)}
|
||||
>
|
||||
<Image
|
||||
alt={image.metaData.altText}
|
||||
|
||||
Reference in New Issue
Block a user