Bläddra i källkod

events header small fix

Viktoriia 1 vecka sedan
förälder
incheckning
5682175835
1 ändrade filer med 26 tillägg och 17 borttagningar
  1. 26 17
      src/screens/InAppScreens/TravelsScreen/EventsScreen/index.tsx

+ 26 - 17
src/screens/InAppScreens/TravelsScreen/EventsScreen/index.tsx

@@ -41,6 +41,7 @@ import Tooltip from 'react-native-walkthrough-tooltip';
 import InfoIcon from 'assets/icons/info-solid.svg';
 import { SafeAreaView } from 'react-native-safe-area-context';
 import TabViewWrapper from 'src/components/TabViewWrapper';
+import { getFontSize } from 'src/utils';
 
 function TabViewDelayed({
   children,
@@ -507,7 +508,6 @@ const EventsScreen = () => {
           scrollEnabled={true}
           keyExtractor={(item) => `${route.key}-${item.id}`}
           renderItem={renderEventCard}
-          estimatedItemSize={120}
           contentContainerStyle={styles.listContainer}
           showsVerticalScrollIndicator={false}
           onScroll={handleScroll}
@@ -534,7 +534,6 @@ const EventsScreen = () => {
                     scrollEnabled={true}
                     keyExtractor={(item) => item.id.toString()}
                     renderItem={renderEventCard}
-                    estimatedItemSize={100}
                     contentContainerStyle={styles.listContainer}
                     showsVerticalScrollIndicator={false}
                   />
@@ -560,21 +559,31 @@ const EventsScreen = () => {
   return (
     <SafeAreaView style={{ height: '100%' }} edges={['top']}>
       <View style={{ marginLeft: '5%', marginRight: '5%' }}>
-        <Header
-          label="Events"
-          rightElement={
-            canAddEvent?.can ? (
-              <TouchableOpacity
-                ref={buttonRef}
-                onPress={handleAddButtonPress}
-                style={{ width: 30 }}
-                hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
-              >
-                <CalendarPlusIcon fill={Colors.DARK_BLUE} />
-              </TouchableOpacity>
-            ) : null
-          }
-        />
+        <View
+          style={{
+            alignItems: 'center',
+            paddingVertical: 16,
+            flexDirection: 'row',
+            justifyContent: 'space-between'
+          }}
+        >
+          <View style={{ width: 30 }} />
+          <Text
+            style={{ color: Colors.DARK_BLUE, fontFamily: 'redhat-700', fontSize: getFontSize(14) }}
+          >
+            Events
+          </Text>
+          {canAddEvent?.can ? (
+            <TouchableOpacity
+              ref={buttonRef}
+              onPress={handleAddButtonPress}
+              style={{ width: 30 }}
+              hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
+            >
+              <CalendarPlusIcon fill={Colors.DARK_BLUE} />
+            </TouchableOpacity>
+          ) : null}
+        </View>
 
         <Animated.View style={[styles.searchContainer, searchContainerAnimatedStyle]}>
           <Input