Skip to content

Commit

Permalink
fix: don't render next/prev for floating pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vpicone committed May 13, 2019
1 parent 21f1a78 commit 0a1c5c4
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,13 @@ const NextPreviousContainer = props => {
return {}; // final page
};

const previousItem = getPreviousItem();
const nextItem = getNextItem();
if (currentTitle !== 'Home' && !navigationList[navIndex]) {
return null;
}

return <NextPrevious previousItem={previousItem} nextItem={nextItem} />;
return (
<NextPrevious previousItem={getPreviousItem()} nextItem={getNextItem()} />
);
};

export default NextPreviousContainer;

0 comments on commit 0a1c5c4

Please sign in to comment.