소스 검색

small fixes

Viktoriia 1 년 전
부모
커밋
ced929c243

+ 4 - 4
src/screens/InAppScreens/TravellersScreen/Components/Profile.tsx

@@ -189,12 +189,12 @@ export const Profile: FC<Props> = ({
         <View style={adaptiveStyle(ScoreStyles.rankingScoresWrapper, {})}>
           {score.map((number, index) => {
             if (scoreNames[index] === 'SLOW' && number >= 4500)
-              return <EmptyScore scoreName={scoreNames[index]} />;
+              return <EmptyScore key={index} scoreName={scoreNames[index]} />;
             if (scoreNames[index] === 'YES' && number >= 10000)
-              return <EmptyScore scoreName={scoreNames[index]} />;
-            if (!number) return <EmptyScore scoreName={scoreNames[index]} />;
+              return <EmptyScore key={index} scoreName={scoreNames[index]} />;
+            if (!number) return <EmptyScore key={index} scoreName={scoreNames[index]} />;
             return (
-              <View style={adaptiveStyle(ScoreStyles.scoreWrapper, {})}>
+              <View key={index} style={adaptiveStyle(ScoreStyles.scoreWrapper, {})}>
                 <Text style={adaptiveStyle([ScoreStyles.scoreHeaderText], {})}>{number}</Text>
                 <Text style={adaptiveStyle([ScoreStyles.scoreNameText], {})}>
                   {scoreNames[index]}

+ 6 - 3
src/screens/InAppScreens/TravellersScreen/UNMasters/index.tsx

@@ -87,10 +87,10 @@ const UNMastersList = React.memo(({ type }: { type: string }) => {
   const renderItem = ({ item }: { item: any }) => {
     const UserItem = ({ user }: { user: Master }) => {
       return (
-        <View style={UNMastersListStyles.wrapper}>
+        <View style={[UNMastersListStyles.wrapper, {}]}>
           <View style={{ gap: 3, marginLeft: 5 }}>
             <Text style={UNMastersListStyles.firstAndLastName}>{user.full_name}</Text>
-            <View style={UNMastersListStyles.wrapper}>
+            <View style={[UNMastersListStyles.wrapper, { marginBottom: 0 }]}>
               <Text style={UNMastersListStyles.descriptionText}>
                 Born: {user.born} / Age when done: {user.age} /
               </Text>
@@ -105,7 +105,7 @@ const UNMastersList = React.memo(({ type }: { type: string }) => {
                 />
               ) : null}
             </View>
-            <View style={UNMastersListStyles.wrapper}>
+            <View style={[UNMastersListStyles.wrapper, { marginBottom: 0 }]}>
               <Text style={UNMastersListStyles.descriptionText}>
                 Year / final country: {user.final_year}
               </Text>
@@ -139,6 +139,7 @@ const UNMastersList = React.memo(({ type }: { type: string }) => {
           </View>
           <FlatList
             contentContainerStyle={{ gap: 10 }}
+            style={{ gap: 12 }}
             horizontal={false}
             showsVerticalScrollIndicator={false}
             data={masters}
@@ -166,6 +167,7 @@ const UNMastersList = React.memo(({ type }: { type: string }) => {
           </View>
           <FlatList
             contentContainerStyle={{ gap: 10 }}
+            style={{ gap: 12 }}
             horizontal={false}
             showsVerticalScrollIndicator={false}
             data={masters}
@@ -189,6 +191,7 @@ const UNMastersList = React.memo(({ type }: { type: string }) => {
   return (
     <FlatList
       contentContainerStyle={{ gap: 10 }}
+      style={{ marginVertical: 8 }}
       horizontal={false}
       data={masters}
       renderItem={renderItem}

+ 2 - 2
src/screens/InAppScreens/TravellersScreen/UNMasters/styles.ts

@@ -11,7 +11,7 @@ export const UNMastersListStyles = StyleSheet.create({
   },
   countryAndYearItemWrapper: {
     display: 'flex',
-    flexDirection: 'column'
+    flexDirection: 'column',
   },
   countryAndYearHeader: {
     width: '100%',
@@ -19,7 +19,7 @@ export const UNMastersListStyles = StyleSheet.create({
     justifyContent: 'center',
     alignItems: 'center',
     flexDirection: 'row',
-    marginTop: 8,
+    marginTop: 5,
     marginBottom: 8,
     gap: 5
   },