Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions src/pages/signin/Socials.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from 'react';
import _ from 'underscore';
import {Pressable, Linking} from 'react-native';
import Icon from '../../components/Icon';
import Text from '../../components/Text';
import * as Expensicons from '../../components/Icon/Expensicons';
import themeColors from '../../styles/themes/default';
import styles from '../../styles/styles';
import variables from '../../styles/variables';
import CONST from '../../CONST';
import Hoverable from '../../components/Hoverable';
import TextLink from '../../components/TextLink';

const socialsList = [
{
Expand Down Expand Up @@ -35,22 +36,23 @@ const socialsList = [
const Socials = () => (
<Text>
{_.map(socialsList, social => (
<Pressable
onPress={() => {
Linking.openURL(social.link);
}}
style={styles.pr1}
<Hoverable
key={social.link}
>
{({hovered}) => (
<Icon
src={social.iconURL}
height={variables.iconSizeLarge}
width={variables.iconSizeLarge}
fill={hovered ? themeColors.link : themeColors.textLight}
/>
{hovered => (
<TextLink
style={styles.pr1}
href={social.link}
>
<Icon
src={social.iconURL}
height={variables.iconSizeLarge}
width={variables.iconSizeLarge}
fill={hovered ? themeColors.link : themeColors.textLight}
/>
</TextLink>
)}
</Pressable>
</Hoverable>
))}
</Text>
);
Expand Down