Skip to content

Commit

Permalink
move showUserDetails outside of component
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Jul 8, 2021
1 parent 7729fc0 commit b7b2f8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/home/report/ReportActionItemSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ const defaultProps = {
wrapperStyles: [styles.chatItem],
};

const showUserDetails = (email) => {
Navigation.navigate(`${ROUTES.DETAILS}/${email}`);
};

const ReportActionItemSingle = ({
action,
personalDetails,
Expand All @@ -59,10 +63,6 @@ const ReportActionItemSingle = ({
? [{type: 'TEXT', text: Str.isSMSLogin(login) ? toLocalPhone(displayName) : displayName}]
: action.person;

const showUserDetails = (email) => {
Navigation.navigate(`${ROUTES.DETAILS}/${email}`);
};

return (
<View style={wrapperStyles}>
<Pressable onPress={() => showUserDetails(action.actorEmail)}>
Expand Down

0 comments on commit b7b2f8e

Please sign in to comment.