import React, { memo } from 'react'; import { StyleSheet, View } from 'react-native'; import { useCalendarContext } from '../../calendar-context'; import MonthButton from './month-button'; import YearButton from './year-button'; import { TimeButton } from './time-button'; import { NavigationPosition } from '../../types'; type Props = { position: NavigationPosition; }; const Selectors = ({ position }: Props) => { const { mode, calendarView, timePicker } = useCalendarContext(); return ( {calendarView !== 'year' ? : null} {timePicker && mode === 'single' && calendarView !== 'year' ? ( ) : null} ); }; export default memo(Selectors); const defaultStyles = StyleSheet.create({ container: { flex: 1, flexDirection: 'row', alignItems: 'center', }, monthAndYear: { gap: 5, flexDirection: 'row', alignItems: 'center', }, });