Skip to content

Commit

Permalink
fix: opening url on footer press causes images to get stuck
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasFridmansky authored and Lipo11 committed Jun 14, 2024
1 parent 78911b0 commit 6aabd43
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const StoryContent: FC<StoryContentProps> = ( { stories, active, activeStory } )
useAnimatedReaction(
() => activeStory.value,
( res, prev ) => res !== prev && onChange(),
[ activeStory.value ],
[ activeStory.value, onChange ],
);

const content = useMemo( () => stories[storyIndex]?.renderContent?.(), [ storyIndex ] );
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const StoryFooter: FC<StoryContentProps> = ( { stories, active, activeStory } )
useAnimatedReaction(
() => activeStory.value,
( res, prev ) => res !== prev && onChange(),
[ activeStory.value ],
[ activeStory.value, onChange ],
);

const footer = useMemo( () => stories[storyIndex]?.renderFooter?.(), [ storyIndex ] );
Expand Down
4 changes: 2 additions & 2 deletions src/components/Image/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ const StoryImage: FC<StoryImageProps> = ( {
useAnimatedReaction(
() => isActive.value,
( res, prev ) => res !== prev && res && runOnJS( onImageChange )(),
[ isActive.value ],
[ isActive.value, onImageChange ],
);

useAnimatedReaction(
() => activeStory.value,
( res, prev ) => res !== prev && runOnJS( onImageChange )(),
[ activeStory.value ],
[ activeStory.value, onImageChange ],
);

const onContentLoad = ( newDuration?: number ) => {
Expand Down

0 comments on commit 6aabd43

Please sign in to comment.