|
@@ -62,9 +62,11 @@ export const Profile: FC<Props> = ({
|
|
|
|
|
|
const scoreNames = ['NM', 'DARE', 'UN', 'UN+', 'TCC', 'DEEP', 'YES', 'SLOW', 'WHS', 'KYE', 'TBT'];
|
|
|
const isOnline = getOnlineStatus();
|
|
|
+
|
|
|
const avatarBaseUri = isOnline
|
|
|
? `${API_HOST}/img/avatars/`
|
|
|
: `${FileSystem.documentDirectory}avatars/`;
|
|
|
+
|
|
|
const flagBaseUri = isOnline
|
|
|
? `${API_HOST}/img/flags_new/`
|
|
|
: `${FileSystem.documentDirectory}flags/`;
|
|
@@ -101,15 +103,7 @@ export const Profile: FC<Props> = ({
|
|
|
|
|
|
const EmptyScore: FC<{ scoreName: string }> = ({ scoreName }) => {
|
|
|
return (
|
|
|
- <View
|
|
|
- style={{
|
|
|
- display: 'flex',
|
|
|
- alignItems: 'center',
|
|
|
- justifyContent: 'center',
|
|
|
- flexDirection: 'column',
|
|
|
- marginBottom: 10
|
|
|
- }}
|
|
|
- >
|
|
|
+ <View style={styles.scoreWrapper}>
|
|
|
<Text style={[styles.scoreHeaderText, { flex: 0 }]}>-</Text>
|
|
|
<Text style={[styles.scoreNameText, { flex: 0 }]}>{scoreName}</Text>
|
|
|
</View>
|
|
@@ -197,16 +191,7 @@ export const Profile: FC<Props> = ({
|
|
|
if (!number) return <EmptyScore scoreName={scoreNames[index]} />;
|
|
|
if (index === active_score) return;
|
|
|
return (
|
|
|
- <View
|
|
|
- style={{
|
|
|
- display: 'flex',
|
|
|
- alignItems: 'center',
|
|
|
- justifyContent: 'center',
|
|
|
- flexDirection: 'column',
|
|
|
- marginBottom: 10,
|
|
|
- width: 40
|
|
|
- }}
|
|
|
- >
|
|
|
+ <View style={styles.scoreWrapper}>
|
|
|
<Text style={[styles.scoreHeaderText, { flex: 0 }]}>{number}</Text>
|
|
|
<Text style={[styles.scoreNameText, { flex: 0 }]}>{scoreNames[index]}</Text>
|
|
|
</View>
|