From 78bd09dec30b55abfb0958af60325944ec1ed958 Mon Sep 17 00:00:00 2001 From: Joel Marcey Date: Tue, 24 Oct 2017 16:35:32 -0700 Subject: [PATCH] Better logic --- lib/core/DocsLayout.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/core/DocsLayout.js b/lib/core/DocsLayout.js index 50d74ae953..5cc4cdfeb2 100644 --- a/lib/core/DocsLayout.js +++ b/lib/core/DocsLayout.js @@ -63,8 +63,13 @@ class DocsLayout extends React.Component { {i18n ? translation[this.props.metadata.language][ "localized-strings" - ][metadata.previous_id] || metadata.previous_id - : "Previous"} + ][metadata.previous_id] || + translation[this.props.metadata.language][ + "localized-strings" + ]["previous"] || + "Previous" + : metadata.previous_id || "Previous" + } )} {metadata.next_id && ( @@ -74,8 +79,13 @@ class DocsLayout extends React.Component { {i18n ? translation[this.props.metadata.language][ "localized-strings" - ][metadata.next_id] || metadata.next_id - : "Next"}{" "} + ][metadata.next_id] || + translation[this.props.metadata.language][ + "localized-strings" + ]["next"] || + "Next" + : metadata.next_id || "Next" + }{" "} → )}