File tree 2 files changed +7
-5
lines changed 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change
1
+ import _ from 'underscore' ;
1
2
import React from 'react' ;
2
3
import { Pressable , StyleSheet } from 'react-native' ;
3
4
import lodashGet from 'lodash/get' ;
@@ -9,14 +10,13 @@ import {CONTEXT_MENU_TYPES} from '../../../pages/home/report/ContextMenu/Context
9
10
import AttachmentView from '../../AttachmentView' ;
10
11
import fileDownload from '../../../libs/fileDownload' ;
11
12
12
-
13
13
/*
14
14
* This is a default anchor component for regular links.
15
15
*/
16
16
const BaseAnchorForCommentsOnly = ( props ) => {
17
17
let linkRef ;
18
+ const rest = _ . omit ( props , _ . keys ( propTypes ) ) ;
18
19
return (
19
-
20
20
props . isAttachment
21
21
? (
22
22
< Pressable onPress = { ( ) => {
@@ -53,7 +53,7 @@ const BaseAnchorForCommentsOnly = (props) => {
53
53
target : props . target ,
54
54
} }
55
55
// eslint-disable-next-line react/jsx-props-no-spreading
56
- { ...props }
56
+ { ...rest }
57
57
>
58
58
{ props . children }
59
59
</ Text >
Original file line number Diff line number Diff line change
1
+ import _ from 'underscore' ;
1
2
import React from 'react' ;
2
3
import lodashGet from 'lodash/get' ;
3
4
import { Linking , StyleSheet , Pressable } from 'react-native' ;
@@ -15,6 +16,7 @@ import styles from '../../../styles/styles';
15
16
*/
16
17
const BaseAnchorForCommentsOnly = ( props ) => {
17
18
let linkRef ;
19
+ const rest = _ . omit ( props , _ . keys ( propTypes ) ) ;
18
20
return (
19
21
props . isAttachment
20
22
? (
@@ -48,8 +50,8 @@ const BaseAnchorForCommentsOnly = (props) => {
48
50
< Text
49
51
ref = { el => linkRef = el }
50
52
style = { StyleSheet . flatten ( props . style ) }
51
- // eslint-disable-next-line react/jsx-props-no-spreading
52
- { ...props }
53
+ // eslint-disable-next-line react/jsx-props-no-spreading
54
+ { ...rest }
53
55
>
54
56
{ props . children }
55
57
</ Text >
You can’t perform that action at this time.
0 commit comments