diff options
author | Ivan Chen <ivan@tagg.id> | 2021-03-29 15:39:42 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-03-29 15:39:42 -0400 |
commit | af2136ff699ac4556732da4e262add82c15b2b5c (patch) | |
tree | df1e45e70f244f46989464b04363bd41e6c7f3c5 /src/components/profile/Avatar.tsx | |
parent | ad2ad5d232473d38426c2f0f8283ba015dadfd4c (diff) |
code cleanup and added cache: reload
Diffstat (limited to 'src/components/profile/Avatar.tsx')
-rw-r--r-- | src/components/profile/Avatar.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/profile/Avatar.tsx b/src/components/profile/Avatar.tsx index 5d677983..e57a56a3 100644 --- a/src/components/profile/Avatar.tsx +++ b/src/components/profile/Avatar.tsx @@ -12,15 +12,15 @@ interface AvatarProps { screenType: ScreenType; } const Avatar: React.FC<AvatarProps> = ({style, screenType, userXId}) => { - const {avatar} = userXId - ? useSelector((state: RootState) => state.userX[screenType][userXId]) - : useSelector((state: RootState) => state.user); + const {avatar} = useSelector((state: RootState) => + userXId ? state.userX[screenType][userXId] : state.user, + ); return ( <Image style={[styles.image, style]} defaultSource={require('../../assets/images/avatar-placeholder.png')} - source={{uri: avatar}} + source={{uri: avatar, cache: 'reload'}} /> ); }; |