aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/Cover.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-29 15:39:42 -0400
committerIvan Chen <ivan@tagg.id>2021-03-29 15:39:42 -0400
commitaf2136ff699ac4556732da4e262add82c15b2b5c (patch)
treedf1e45e70f244f46989464b04363bd41e6c7f3c5 /src/components/profile/Cover.tsx
parentad2ad5d232473d38426c2f0f8283ba015dadfd4c (diff)
code cleanup and added cache: reload
Diffstat (limited to 'src/components/profile/Cover.tsx')
-rw-r--r--src/components/profile/Cover.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/profile/Cover.tsx b/src/components/profile/Cover.tsx
index b7502cff..ee804ff3 100644
--- a/src/components/profile/Cover.tsx
+++ b/src/components/profile/Cover.tsx
@@ -10,16 +10,16 @@ interface CoverProps {
screenType: ScreenType;
}
const Cover: React.FC<CoverProps> = ({userXId, screenType}) => {
- const {cover} = userXId
- ? useSelector((state: RootState) => state.userX[screenType][userXId])
- : useSelector((state: RootState) => state.user);
+ const {cover} = useSelector((state: RootState) =>
+ userXId ? state.userX[screenType][userXId] : state.user,
+ );
return (
<View style={[styles.container]}>
<Image
style={styles.image}
defaultSource={require('../../assets/images/cover-placeholder.png')}
- source={{uri: cover}}
+ source={{uri: cover, cache: 'reload'}}
/>
</View>
);