diff options
author | Shravya Ramesh <shravs1208@gmail.com> | 2021-02-09 17:11:03 -0800 |
---|---|---|
committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-02-09 17:11:03 -0800 |
commit | 4b6faadd4cc0a69b0aad5b44dfe6292635b39f6b (patch) | |
tree | 959cf8d5960e20cf378bc667ffacf5527a9e3560 /src/components/common/SocialIcon.tsx | |
parent | 7fd3d9f6c4297747512f2bea69a11268ffa35f08 (diff) |
changed insta icon + added extra prop for switch
Diffstat (limited to 'src/components/common/SocialIcon.tsx')
-rw-r--r-- | src/components/common/SocialIcon.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/components/common/SocialIcon.tsx b/src/components/common/SocialIcon.tsx index 3c9deb6d..0cd5d2a7 100644 --- a/src/components/common/SocialIcon.tsx +++ b/src/components/common/SocialIcon.tsx @@ -1,9 +1,11 @@ import React from 'react'; import {Image} from 'react-native'; +import {ScreenType} from '../../types'; interface SocialIconProps { social: string; style: object; + screenType: ScreenType; } /** * An image component that returns the <Image> of the icon for a specific social media platform. @@ -11,10 +13,14 @@ interface SocialIconProps { const SocialIcon: React.FC<SocialIconProps> = ({ social: social, style: style, + screenType, }) => { switch (social) { case 'Instagram': - var icon = require('../../assets/socials/instagram-icon.png'); + var icon = require('../../assets/socials/instagram-icon-white-bg.png'); + if (screenType === ScreenType.SuggestedPeople) { + icon = require('../../assets/socials/instagram-icon.png'); + } break; case 'Facebook': var icon = require('../../assets/socials/facebook-icon.png'); |