From 0a1c5c47f8380f714efbaa0379f8d297727c9994 Mon Sep 17 00:00:00 2001 From: Vince Picone Date: Mon, 13 May 2019 16:19:30 -0500 Subject: [PATCH] fix: don't render next/prev for floating pages --- .../src/components/NextPrevious/NextPrevious.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/gatsby-theme-carbon/src/components/NextPrevious/NextPrevious.js b/packages/gatsby-theme-carbon/src/components/NextPrevious/NextPrevious.js index 8e3197e1b..6c68b878d 100644 --- a/packages/gatsby-theme-carbon/src/components/NextPrevious/NextPrevious.js +++ b/packages/gatsby-theme-carbon/src/components/NextPrevious/NextPrevious.js @@ -164,10 +164,13 @@ const NextPreviousContainer = props => { return {}; // final page }; - const previousItem = getPreviousItem(); - const nextItem = getNextItem(); + if (currentTitle !== 'Home' && !navigationList[navIndex]) { + return null; + } - return ; + return ( + + ); }; export default NextPreviousContainer;