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)}

}
); }; diff --git a/src/popup/styles/ResultArea.scss b/src/popup/styles/ResultArea.scss index 8f51b59..ea0d15d 100644 --- a/src/popup/styles/ResultArea.scss +++ b/src/popup/styles/ResultArea.scss @@ -14,7 +14,8 @@ &.resultText { color: var(--main-text); } - &.candidateText { + &.candidateText, + &.error { color: var(--sub-text); margin-top: 1em; &:empty {