|
@@ -99,7 +99,7 @@ export const Profile: FC<Props> = ({
|
|
|
) : null;
|
|
|
};
|
|
|
|
|
|
- const EmptyScore = () => {
|
|
|
+ const EmptyScore: FC<{ scoreName: string }> = ({ scoreName }) => {
|
|
|
return (
|
|
|
<View
|
|
|
style={{
|
|
@@ -110,8 +110,8 @@ export const Profile: FC<Props> = ({
|
|
|
marginBottom: 10
|
|
|
}}
|
|
|
>
|
|
|
- <Text style={[styles.scoreHeaderText, { flex: 0 }]}></Text>
|
|
|
- <Text style={[styles.scoreNameText, { flex: 0 }]}></Text>
|
|
|
+ <Text style={[styles.scoreHeaderText, { flex: 0 }]}>-</Text>
|
|
|
+ <Text style={[styles.scoreNameText, { flex: 0 }]}>{scoreName}</Text>
|
|
|
</View>
|
|
|
);
|
|
|
};
|
|
@@ -189,26 +189,12 @@ export const Profile: FC<Props> = ({
|
|
|
</View>
|
|
|
|
|
|
<View style={styles.rankingScoresWrapper}>
|
|
|
- {score.slice(1).map((number, index) => {
|
|
|
- if (!number) return <EmptyScore />;
|
|
|
+ {score.map((number, index) => {
|
|
|
+ if (scoreNames[index] === 'SLOW' && number >= 4500)
|
|
|
+ return <EmptyScore scoreName={scoreNames[index]} />;
|
|
|
if (scoreNames[index] === 'YES' && number >= 10000)
|
|
|
- return (
|
|
|
- <View
|
|
|
- style={{
|
|
|
- display: 'flex',
|
|
|
- alignItems: 'center',
|
|
|
- justifyContent: 'center',
|
|
|
- flexDirection: 'column',
|
|
|
- marginBottom: 10,
|
|
|
- width: 40,
|
|
|
- borderWidth: 1
|
|
|
- }}
|
|
|
- >
|
|
|
- <Text style={[styles.scoreHeaderText, { flex: 0 }]}>-</Text>
|
|
|
- <Text style={[styles.scoreNameText, { flex: 0 }]}>YES</Text>
|
|
|
- </View>
|
|
|
- );
|
|
|
- if (scoreNames[index] === 'SLOW' && number >= 4500) return <EmptyScore />;
|
|
|
+ return <EmptyScore scoreName={scoreNames[index]} />;
|
|
|
+ if (!number) return <EmptyScore scoreName={scoreNames[index]} />;
|
|
|
if (index === active_score) return;
|
|
|
return (
|
|
|
<View
|