From 1783a20a31373284d69a7e400fa9ceac6c8a2637 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Fri, 23 Jun 2023 13:13:11 +0200 Subject: [PATCH] fix: onInterpretationClick is back --- .../InterpretationsUnit/InterpretationList.js | 7 ++----- .../common/Interpretation/Interpretation.js | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/Interpretations/InterpretationsUnit/InterpretationList.js b/src/components/Interpretations/InterpretationsUnit/InterpretationList.js index 58a07c34f..2d69488f5 100644 --- a/src/components/Interpretations/InterpretationsUnit/InterpretationList.js +++ b/src/components/Interpretations/InterpretationsUnit/InterpretationList.js @@ -62,10 +62,7 @@ export const InterpretationList = ({ key={interpretation.id} interpretation={interpretation} currentUser={currentUser} - onClick={ - !!onInterpretationClick && - onInterpretationClick - } + onClick={onInterpretationClick} onReplyIconClick={onReplyIconClick} onDeleted={refresh} onUpdated={refresh} @@ -119,8 +116,8 @@ InterpretationList.propTypes = { currentUser: PropTypes.object.isRequired, interpretations: PropTypes.array.isRequired, refresh: PropTypes.func.isRequired, + onInterpretationClick: PropTypes.func.isRequired, onReplyIconClick: PropTypes.func.isRequired, appUrl: PropTypes.string, disabled: PropTypes.bool, - onInterpretationClick: PropTypes.func, } diff --git a/src/components/Interpretations/common/Interpretation/Interpretation.js b/src/components/Interpretations/common/Interpretation/Interpretation.js index 4146fb50a..3216a79f1 100644 --- a/src/components/Interpretations/common/Interpretation/Interpretation.js +++ b/src/components/Interpretations/common/Interpretation/Interpretation.js @@ -77,7 +77,7 @@ export const Interpretation = ({ onReplyIconClick(interpretation.id)} + onClick={() => onClick(interpretation.id)} dataTest="interpretation-view-button" /> )}