From a00a36f919b8c7a1c91e8cb164ddc675547e27b0 Mon Sep 17 00:00:00 2001 From: ErikSin <67773827+ErikSin@users.noreply.github.com> Date: Wed, 1 May 2024 14:03:37 -0700 Subject: [PATCH] chore: resize observations list icon --- .../screens/ObservationsList/index.tsx | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/frontend/screens/ObservationsList/index.tsx b/src/frontend/screens/ObservationsList/index.tsx index 3fc0ca5fc..cf95cad5c 100644 --- a/src/frontend/screens/ObservationsList/index.tsx +++ b/src/frontend/screens/ObservationsList/index.tsx @@ -6,7 +6,10 @@ import ObservationEmptyView from './ObservationsEmptyView'; import {Observation} from '@mapeo/schema'; import {NativeHomeTabsNavigationProps} from '../../sharedTypes'; import {useAllObservations} from '../../hooks/useAllObservations'; -import {MessageDescriptor, defineMessages} from 'react-intl'; +import {MessageDescriptor, defineMessages, useIntl} from 'react-intl'; +import {BottomTabNavigationOptions} from '@react-navigation/bottom-tabs'; +import {ObservationsListBarIcon} from '../../Navigation/ScreenGroups/TabBar/ObservationsListTabBarIcon'; +import {ObservationListHeaderLeft} from './ObservationListHeaderLeft'; const m = defineMessages({ loading: { @@ -86,6 +89,22 @@ export const ObservationsList: React.FC< ); }; +export function CreateNavigationOptions(): BottomTabNavigationOptions { + const {formatMessage} = useIntl(); + return { + tabBarIcon: ObservationsListBarIcon, + headerLeft: ObservationListHeaderLeft, + headerTransparent: false, + headerTitle: formatMessage(ObservationsList.navTitle), + headerShadowVisible: true, + headerStyle: { + elevation: 15, + shadowOpacity: 0, + borderBottomWidth: 1, + }, + }; +} + ObservationsList.navTitle = m.observationListTitle; const styles = StyleSheet.create({