diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js
index 4707a71e396b..eb55a8996e08 100644
--- a/src/pages/home/ReportScreen.js
+++ b/src/pages/home/ReportScreen.js
@@ -236,13 +236,7 @@ class ReportScreen extends React.Component {
placeholder={(
<>
-
-
-
-
+
>
)}
>
@@ -318,15 +312,9 @@ class ReportScreen extends React.Component {
{/* Note: The report should be allowed to mount even if the initial report actions are not loaded. If we prevent rendering the report while they are loading then
we'll unnecessarily unmount the ReportActionsView which will clear the new marker lines initial state. */}
{(!this.isReportReadyForDisplay() || isLoadingInitialReportActions) && (
- <>
-
-
- >
+
)}
diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js
index e07b1880d514..7811d1c25ee1 100644
--- a/src/pages/home/report/ReportActionCompose.js
+++ b/src/pages/home/report/ReportActionCompose.js
@@ -88,10 +88,7 @@ const propTypes = {
isFocused: PropTypes.bool.isRequired,
/** Is the composer full size */
- isComposerFullSize: PropTypes.bool,
-
- /** Whether user interactions should be disabled */
- disabled: PropTypes.bool,
+ isComposerFullSize: PropTypes.bool.isRequired,
// The NVP describing a user's block status
blockedFromConcierge: PropTypes.shape({
@@ -575,7 +572,7 @@ class ReportActionCompose extends React.Component {
onMouseDown={e => e.preventDefault()}
style={styles.composerSizeButton}
underlayColor={themeColors.componentBG}
- disabled={isBlockedFromConcierge || this.props.disabled}
+ disabled={isBlockedFromConcierge}
>
@@ -594,7 +591,7 @@ class ReportActionCompose extends React.Component {
onMouseDown={e => e.preventDefault()}
style={styles.composerSizeButton}
underlayColor={themeColors.componentBG}
- disabled={isBlockedFromConcierge || this.props.disabled}
+ disabled={isBlockedFromConcierge}
>
@@ -612,7 +609,7 @@ class ReportActionCompose extends React.Component {
}}
style={styles.chatItemAttachButton}
underlayColor={themeColors.componentBG}
- disabled={isBlockedFromConcierge || this.props.disabled}
+ disabled={isBlockedFromConcierge}
>
@@ -675,7 +672,7 @@ class ReportActionCompose extends React.Component {
onPasteFile={displayFileInModal}
shouldClear={this.state.textInputShouldClear}
onClear={() => this.setTextInputShouldClear(false)}
- isDisabled={isComposeDisabled || isBlockedFromConcierge || this.props.disabled}
+ isDisabled={isComposeDisabled || isBlockedFromConcierge}
selection={this.state.selection}
onSelectionChange={this.onSelectionChange}
isFullComposerAvailable={this.state.isFullComposerAvailable}
@@ -690,7 +687,7 @@ class ReportActionCompose extends React.Component {
{canUseTouchScreen() && this.props.isMediumScreenWidth ? null : (
this.focus(true)}
onEmojiSelected={this.addEmojiToTextBox}
/>
@@ -707,7 +704,7 @@ class ReportActionCompose extends React.Component {
// Keep focus on the composer when Send message is clicked.
// eslint-disable-next-line react/jsx-props-no-multi-spaces
onMouseDown={e => e.preventDefault()}
- disabled={this.state.isCommentEmpty || isBlockedFromConcierge || this.props.disabled || hasExceededMaxCommentLength}
+ disabled={this.state.isCommentEmpty || isBlockedFromConcierge || hasExceededMaxCommentLength}
hitSlop={{
top: 3, right: 3, bottom: 3, left: 3,
}}
diff --git a/src/pages/home/report/ReportFooter.js b/src/pages/home/report/ReportFooter.js
index 3aa2feff5f80..7c3a4191b390 100644
--- a/src/pages/home/report/ReportFooter.js
+++ b/src/pages/home/report/ReportFooter.js
@@ -21,16 +21,16 @@ import reportPropTypes from '../../reportPropTypes';
const propTypes = {
/** Report object for the current report */
- report: reportPropTypes,
+ report: reportPropTypes.isRequired,
/** Report actions for the current report */
- reportActions: PropTypes.objectOf(PropTypes.shape(reportActionPropTypes)),
+ reportActions: PropTypes.objectOf(PropTypes.shape(reportActionPropTypes)).isRequired,
/** Offline status */
isOffline: PropTypes.bool.isRequired,
/** Callback fired when the comment is submitted */
- onSubmitComment: PropTypes.func,
+ onSubmitComment: PropTypes.func.isRequired,
/** Any errors associated with an attempt to create a chat */
// eslint-disable-next-line react/forbid-prop-types
@@ -42,20 +42,13 @@ const propTypes = {
/** Whether the composer input should be shown */
shouldShowComposeInput: PropTypes.bool,
- /** Whether user interactions should be disabled */
- shouldDisableCompose: PropTypes.bool,
-
...windowDimensionsPropTypes,
};
const defaultProps = {
- report: {reportID: '0'},
- reportActions: {},
- onSubmitComment: () => {},
+ shouldShowComposeInput: true,
errors: {},
pendingAction: null,
- shouldShowComposeInput: true,
- shouldDisableCompose: false,
};
class ReportFooter extends React.Component {
@@ -106,7 +99,6 @@ class ReportFooter extends React.Component {
reportActions={this.props.reportActions}
report={this.props.report}
isComposerFullSize={this.props.isComposerFullSize}
- disabled={this.props.shouldDisableCompose}
/>