Skip to content

Commit

Permalink
fix: make StoryDetailItem Header & Footer render only if current story
Browse files Browse the repository at this point in the history
  • Loading branch information
JonatanSalas committed Nov 2, 2020
1 parent abfab39 commit 4d0e9c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/StoryDetailItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export const StoryDetailItem: React.FC<StoryDetailItemProps> = ({
videoDuration: duration,
};

const header = <StoryDetailItemHeader {...commonProps} />;
const footer = <StoryDetailItemFooter {...commonProps} />;
const header = isCurrentStory && <StoryDetailItemHeader {...commonProps} />;
const footer = isCurrentStory && <StoryDetailItemFooter {...commonProps} />;

return (
<>
Expand Down

0 comments on commit 4d0e9c7

Please sign in to comment.