Skip to content

Commit

Permalink
Fix BaseAnchorForCommentsOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Nov 8, 2021
1 parent a9c2221 commit be757dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import _ from 'underscore';
import React from 'react';
import {Pressable, StyleSheet} from 'react-native';
import lodashGet from 'lodash/get';
Expand All @@ -9,14 +10,13 @@ import {CONTEXT_MENU_TYPES} from '../../../pages/home/report/ContextMenu/Context
import AttachmentView from '../../AttachmentView';
import fileDownload from '../../../libs/fileDownload';


/*
* This is a default anchor component for regular links.
*/
const BaseAnchorForCommentsOnly = (props) => {
let linkRef;
const rest = _.omit(props, _.keys(propTypes));
return (

props.isAttachment
? (
<Pressable onPress={() => {
Expand Down Expand Up @@ -53,7 +53,7 @@ const BaseAnchorForCommentsOnly = (props) => {
target: props.target,
}}
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
{...rest}
>
{props.children}
</Text>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import _ from 'underscore';
import React from 'react';
import lodashGet from 'lodash/get';
import {Linking, StyleSheet, Pressable} from 'react-native';
Expand All @@ -15,6 +16,7 @@ import styles from '../../../styles/styles';
*/
const BaseAnchorForCommentsOnly = (props) => {
let linkRef;
const rest = _.omit(props, _.keys(propTypes));
return (
props.isAttachment
? (
Expand Down Expand Up @@ -48,8 +50,8 @@ const BaseAnchorForCommentsOnly = (props) => {
<Text
ref={el => linkRef = el}
style={StyleSheet.flatten(props.style)}
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
// eslint-disable-next-line react/jsx-props-no-spreading
{...rest}
>
{props.children}
</Text>
Expand Down

0 comments on commit be757dc

Please sign in to comment.