aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/profile/Cover.tsx36
-rw-r--r--src/components/profile/TaggAvatar.tsx2
2 files changed, 18 insertions, 20 deletions
diff --git a/src/components/profile/Cover.tsx b/src/components/profile/Cover.tsx
index 82231417..5d5b4234 100644
--- a/src/components/profile/Cover.tsx
+++ b/src/components/profile/Cover.tsx
@@ -13,7 +13,7 @@ import GreyPurplePlus from '../../assets/icons/grey-purple-plus.svg';
import {useDispatch, useSelector} from 'react-redux';
import {loadUserData, resetHeaderAndProfileImage} from '../../store/actions';
import {RootState} from '../../store/rootreducer';
-import {patchProfile, validateImageLink} from '../../utils';
+import {normalize, patchProfile, validateImageLink} from '../../utils';
interface CoverProps {
userXId: string | undefined;
@@ -44,7 +44,7 @@ const Cover: React.FC<CoverProps> = ({userXId, screenType}) => {
const handleNewImage = async () => {
setLoading(true);
- const result = await patchProfile('Select Header Picture', user.userId);
+ const result = await patchProfile('header', user.userId);
setLoading(true);
if (result) {
setNeedsUpdate(true);
@@ -62,22 +62,20 @@ const Cover: React.FC<CoverProps> = ({userXId, screenType}) => {
if (!validImage && userXId === undefined && !loading) {
return (
- <>
- <View style={[styles.container]}>
- <ImageBackground
- style={styles.image}
- defaultSource={require('../../assets/images/cover-placeholder.png')}
- source={{uri: cover, cache: 'reload'}}>
- <TouchableOpacity
- accessible={true}
- accessibilityLabel="ADD HEADER PICTURE"
- onPress={() => handleNewImage()}>
- <GreyPurplePlus style={styles.plus} />
- <Text style={styles.text}>Add Picture</Text>
- </TouchableOpacity>
- </ImageBackground>
- </View>
- </>
+ <View style={[styles.container]}>
+ <ImageBackground
+ style={styles.image}
+ defaultSource={require('../../assets/images/cover-placeholder.png')}
+ source={{uri: cover, cache: 'reload'}}>
+ <TouchableOpacity
+ accessible={true}
+ accessibilityLabel="ADD HEADER PICTURE"
+ onPress={() => handleNewImage()}>
+ <GreyPurplePlus style={styles.plus} />
+ <Text style={styles.text}>Add Picture</Text>
+ </TouchableOpacity>
+ </ImageBackground>
+ </View>
);
} else {
return (
@@ -108,7 +106,7 @@ const styles = StyleSheet.create({
text: {
color: 'white',
position: 'absolute',
- fontSize: 18,
+ fontSize: normalize(16),
top: 80,
right: 20,
},
diff --git a/src/components/profile/TaggAvatar.tsx b/src/components/profile/TaggAvatar.tsx
index 1f6bbba6..304b9e3a 100644
--- a/src/components/profile/TaggAvatar.tsx
+++ b/src/components/profile/TaggAvatar.tsx
@@ -46,7 +46,7 @@ const TaggAvatar: React.FC<TaggAvatarProps> = ({
const handleNewImage = async () => {
setLoading(true);
- const result = await patchProfile('Select Profile Picture', user.userId);
+ const result = await patchProfile('profile', user.userId);
if (result) {
setNeedsUpdate(true);
} else {