Skip to content

Commit 4c4d20e

Browse files
committed
reorder scroll and observer divs
1 parent c18ec6b commit 4c4d20e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/react/Gallery.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ const Gallery: FC<Props> = ({ images }) => {
125125
))}
126126
</div>
127127

128+
{/* control threshold with margin-top */}
129+
<div ref={observerTarget} className="mt-0" />
130+
128131
<div
129132
className={cn(
130133
'flex items-center justify-center transition-all duration-500 ease-in-out',
@@ -133,9 +136,6 @@ const Gallery: FC<Props> = ({ images }) => {
133136
>
134137
{shouldShowLoader && <PiSpinnerGapBold className="size-10 sm:size-12 animate-spin mt-4" />}
135138
</div>
136-
137-
{/* control threshold with margin-top */}
138-
<div ref={observerTarget} className="mt-0" />
139139
</>
140140
);
141141
};

0 commit comments

Comments
 (0)