From 440eb7e7385ba228570a2f429916aaf7bc2470d4 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Fri, 23 Jun 2023 13:26:05 +0200 Subject: [PATCH] fix: a little more cleanup --- i18n/en.pot | 4 +-- .../InterpretationsUnit.js | 27 +++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 9ca693656..db4a20423 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2023-06-22T09:43:30.710Z\n" -"PO-Revision-Date: 2023-06-22T09:43:30.710Z\n" +"POT-Creation-Date: 2023-06-23T09:35:54.767Z\n" +"PO-Revision-Date: 2023-06-23T09:35:54.767Z\n" msgid "view only" msgstr "view only" diff --git a/src/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js b/src/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js index 2e1b5bc23..b97340711 100644 --- a/src/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +++ b/src/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js @@ -39,7 +39,19 @@ const interpretationsQuery = { } export const InterpretationsUnit = forwardRef( - ({ currentUser, type, id, disabled, renderId, ...rest }, ref) => { + ( + { + currentUser, + type, + id, + onInterpretationClick, + onReplyIconClick, + disabled, + renderId, + appUrl, + }, + ref + ) => { const [isExpanded, setIsExpanded] = useState(true) const { data, loading, fetching, refetch } = useDataQuery( @@ -110,9 +122,13 @@ export const InterpretationsUnit = forwardRef( interpretations={ data.interpretations.interpretations } + onInterpretationClick={ + onInterpretationClick + } + onReplyIconClick={onReplyIconClick} refresh={onCompleteAction} disabled={disabled} - {...rest} + appUrl={appUrl} /> )} @@ -165,10 +181,17 @@ export const InterpretationsUnit = forwardRef( InterpretationsUnit.displayName = 'InterpretationsUnit' +InterpretationsUnit.defaultProps = { + onInterpretationClick: Function.prototype, +} + InterpretationsUnit.propTypes = { currentUser: PropTypes.object.isRequired, id: PropTypes.string.isRequired, type: PropTypes.string.isRequired, + appUrl: PropTypes.string, disabled: PropTypes.bool, renderId: PropTypes.number, + onInterpretationClick: PropTypes.func, + onReplyIconClick: PropTypes.func, }