Skip to content

Commit

Permalink
chore: resize observations list icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSin committed May 1, 2024
1 parent 9e45209 commit a00a36f
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/frontend/screens/ObservationsList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit a00a36f

Please sign in to comment.