diff --git a/src/popup/components/ResultArea.js b/src/popup/components/ResultArea.js index 495cf87..cc7021c 100644 --- a/src/popup/components/ResultArea.js +++ b/src/popup/components/ResultArea.js @@ -1,5 +1,6 @@ import React from "react"; import getErrorMessage from "src/common/getErrorMessage"; +import { getSettings } from "src/settings/settings"; import "../styles/ResultArea.scss"; const splitLine = text => { @@ -10,13 +11,13 @@ const splitLine = text => { export default props => { const { resultText, candidateText, statusText } = props; const isError = statusText !== "OK"; + const shouldShowCandidate = getSettings("ifShowCandidate"); return (
{splitLine(resultText)}
-- {isError ? getErrorMessage(statusText) : splitLine(candidateText)} -
+ {shouldShowCandidate &&{splitLine(candidateText)}
} + {isError &&{getErrorMessage(statusText)}
}