File tree 4 files changed +12
-29
lines changed 4 files changed +12
-29
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export default (onyxKeyName) => {
26
26
} ,
27
27
} ) ( Provider ) ;
28
28
29
- const withOnyxKey = ( { propName = onyxKeyName , transformValue = ( ) => { } } = { } ) => ( WrappedComponent ) => {
29
+ const withOnyxKey = ( { propName = onyxKeyName , transformValue} = { } ) => ( WrappedComponent ) => {
30
30
const Consumer = forwardRef ( ( props , ref ) => (
31
31
< Context . Consumer >
32
32
{ ( value ) => {
Original file line number Diff line number Diff line change @@ -134,7 +134,14 @@ class ReportScreen extends React.Component {
134
134
135
135
< View nativeID = { CONST . REPORT . DROP_NATIVE_ID } style = { [ styles . flex1 , styles . justifyContentEnd ] } >
136
136
< FullScreenLoadingIndicator visible = { this . shouldShowLoader ( ) } />
137
- { ! this . shouldShowLoader ( ) && < ReportActionsView reportID = { reportID } /> }
137
+ { ! this . shouldShowLoader ( ) && (
138
+ < ReportActionsView
139
+ reportID = { reportID }
140
+ reportActions = { this . props . reportActions }
141
+ report = { this . props . report }
142
+ session = { this . props . session }
143
+ />
144
+ ) }
138
145
{ this . props . session . shouldShowComposeInput && (
139
146
< SwipeableView onSwipeDown = { ( ) => Keyboard . dismiss ( ) } >
140
147
< ReportActionCompose
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ import Text from '../../../components/Text';
56
56
import { participantPropTypes } from '../sidebar/optionPropTypes' ;
57
57
import currentUserPersonalDetailsPropsTypes from '../../settings/Profile/currentUserPersonalDetailsPropsTypes' ;
58
58
import ParticipantLocalTime from './ParticipantLocalTime' ;
59
+ import { withNetwork , withPersonalDetails } from '../../../components/OnyxProvider' ;
59
60
60
61
const propTypes = {
61
62
/** Beta features list */
@@ -673,6 +674,8 @@ export default compose(
673
674
withDrawerState ,
674
675
withNavigationFocus ,
675
676
withLocalize ,
677
+ withPersonalDetails ( ) ,
678
+ withNetwork ( ) ,
676
679
withOnyx ( {
677
680
betas : {
678
681
key : ONYXKEYS . BETAS ,
@@ -683,22 +686,9 @@ export default compose(
683
686
modal : {
684
687
key : ONYXKEYS . MODAL ,
685
688
} ,
686
- network : {
687
- key : ONYXKEYS . NETWORK ,
688
- } ,
689
689
myPersonalDetails : {
690
690
key : ONYXKEYS . MY_PERSONAL_DETAILS ,
691
691
} ,
692
- personalDetails : {
693
- key : ONYXKEYS . PERSONAL_DETAILS ,
694
- } ,
695
- reportActions : {
696
- key : ( { reportID} ) => `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ reportID } ` ,
697
- canEvict : false ,
698
- } ,
699
- report : {
700
- key : ( { reportID} ) => `${ ONYXKEYS . COLLECTION . REPORT } ${ reportID } ` ,
701
- } ,
702
692
blockedFromConcierge : {
703
693
key : ONYXKEYS . NVP_BLOCKED_FROM_CONCIERGE ,
704
694
} ,
Original file line number Diff line number Diff line change 8
8
import PropTypes from 'prop-types' ;
9
9
import _ from 'underscore' ;
10
10
import lodashGet from 'lodash/get' ;
11
- import { withOnyx } from 'react-native-onyx' ;
12
11
import Text from '../../../components/Text' ;
13
12
import {
14
13
fetchActions ,
@@ -18,7 +17,6 @@ import {
18
17
subscribeToReportTypingEvents ,
19
18
unsubscribeFromReportChannel ,
20
19
} from '../../../libs/actions/Report' ;
21
- import ONYXKEYS from '../../../ONYXKEYS' ;
22
20
import ReportActionItem from './ReportActionItem' ;
23
21
import styles from '../../../styles/styles' ;
24
22
import ReportActionPropTypes from './ReportActionPropTypes' ;
@@ -457,16 +455,4 @@ export default compose(
457
455
withWindowDimensions ,
458
456
withDrawerState ,
459
457
withLocalize ,
460
- withOnyx ( {
461
- report : {
462
- key : ( { reportID} ) => `${ ONYXKEYS . COLLECTION . REPORT } ${ reportID } ` ,
463
- } ,
464
- reportActions : {
465
- key : ( { reportID} ) => `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ reportID } ` ,
466
- canEvict : false ,
467
- } ,
468
- session : {
469
- key : ONYXKEYS . SESSION ,
470
- } ,
471
- } ) ,
472
458
) ( ReportActionsView ) ;
You can’t perform that action at this time.
0 commit comments