diff --git a/mobile/.eslintrc.json b/mobile/.eslintrc.json index b5cb9933..a2025889 100644 --- a/mobile/.eslintrc.json +++ b/mobile/.eslintrc.json @@ -55,6 +55,12 @@ ], "react/prop-types": "off", "react-hooks/exhaustive-deps": "warn", + "react/function-component-definition": [ + "warn", + { + "namedComponents": "arrow-function" + } + ], "no-console": "off", "curly": "error", "@typescript-eslint/no-explicit-any": "off", diff --git a/mobile/App.tsx b/mobile/App.tsx index 7543294a..1811e157 100644 --- a/mobile/App.tsx +++ b/mobile/App.tsx @@ -25,7 +25,7 @@ SplashScreen.preventAutoHideAsync() .then((result) => console.log(`SplashScreen.preventAutoHideAsync() succeeded: ${result}`)) .catch(console.warn) // it's good to explicitly catch and inspect any error -function App() { +const App = () => { const [appIsReady, setAppIsReady] = useState(false) const responseListener = useRef() const navigationRef = useRef>(null) diff --git a/mobile/components/Accordion.tsx b/mobile/components/Accordion.tsx index 6bd36c58..e84b6b2b 100644 --- a/mobile/components/Accordion.tsx +++ b/mobile/components/Accordion.tsx @@ -15,11 +15,11 @@ interface AccordionProps { children?: React.ReactNode } -function Accordion({ +const Accordion = ({ style, title, children -}: AccordionProps) { +}: AccordionProps) => { const [open, setOpen] = useState(false) const animatedController = useRef(new Animated.Value(0)).current diff --git a/mobile/components/AgencyFilter.tsx b/mobile/components/AgencyFilter.tsx index bdc1acd7..91ed7c67 100644 --- a/mobile/components/AgencyFilter.tsx +++ b/mobile/components/AgencyFilter.tsx @@ -18,12 +18,12 @@ interface AgencyFilterProps { onChange?: (checkedAgencies: string[]) => void } -function AgencyFilter({ +const AgencyFilter = ({ visible, style, onLoad, onChange -}: AgencyFilterProps) { +}: AgencyFilterProps) => { const [agencies, setAgencies] = useState([]) const [checkedAgencies, setCheckedAgencies] = useState([]) const [allChecked, setAllChecked] = useState(true) diff --git a/mobile/components/AutocompleteDropdown/HOC/withFadeAnimation.tsx b/mobile/components/AutocompleteDropdown/HOC/withFadeAnimation.tsx index 8c1d00a2..beaf1295 100644 --- a/mobile/components/AutocompleteDropdown/HOC/withFadeAnimation.tsx +++ b/mobile/components/AutocompleteDropdown/HOC/withFadeAnimation.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useRef } from 'react' import { Animated, Easing } from 'react-native' export const withFadeAnimation = (WrappedComponent: () => React.JSX.Element, containerStyle?: object) => { - function FadeAnimation(props: object) { + const FadeAnimation = (props: object) => { const opacityAnimationValue = useRef(new Animated.Value(0)).current useEffect(() => { diff --git a/mobile/components/AutocompleteDropdown/NothingFound.tsx b/mobile/components/AutocompleteDropdown/NothingFound.tsx index 1fd1486e..e0b005e9 100644 --- a/mobile/components/AutocompleteDropdown/NothingFound.tsx +++ b/mobile/components/AutocompleteDropdown/NothingFound.tsx @@ -2,7 +2,7 @@ import React, { memo } from 'react' import { StyleSheet, Text, View } from 'react-native' import { withFadeAnimation } from './HOC/withFadeAnimation' -function EmptyResult({ ...props }) { +const EmptyResult = ({ ...props }) => { const EL = withFadeAnimation( () => ( diff --git a/mobile/components/AutocompleteDropdown/RightButton.tsx b/mobile/components/AutocompleteDropdown/RightButton.tsx index 276a6f28..1bb3d681 100644 --- a/mobile/components/AutocompleteDropdown/RightButton.tsx +++ b/mobile/components/AutocompleteDropdown/RightButton.tsx @@ -12,7 +12,7 @@ import Feather from 'react-native-vector-icons/Feather' Feather.loadFont() -function RightButtonComponent({ +const RightButtonComponent = ({ inputHeight, isOpened, showChevron, @@ -34,7 +34,7 @@ function RightButtonComponent({ ClearIconComponent?: boolean onClearPress: () => void onChevronPress: () => void -}) { +}) => { const isOpenedAnimationValue = useRef(new Animated.Value(0)).current useEffect(() => { diff --git a/mobile/components/AutocompleteDropdown/ScrollViewListItem.tsx b/mobile/components/AutocompleteDropdown/ScrollViewListItem.tsx index ee3f8bfa..d698100c 100644 --- a/mobile/components/AutocompleteDropdown/ScrollViewListItem.tsx +++ b/mobile/components/AutocompleteDropdown/ScrollViewListItem.tsx @@ -6,7 +6,7 @@ import { View } from 'react-native' -function ScrollViewListItemComponent({ +const ScrollViewListItemComponent = ({ titleHighlighted, titleStart, titleEnd, @@ -21,8 +21,7 @@ function ScrollViewListItemComponent({ style?: object numberOfLines?: number onPress: () => void - }) { - return ( + }) => ( @@ -39,7 +38,6 @@ function ScrollViewListItemComponent({ ) -} export const ScrollViewListItem = memo(ScrollViewListItemComponent) diff --git a/mobile/components/Backdrop.tsx b/mobile/components/Backdrop.tsx index 0852cfc2..4f3eb4a3 100644 --- a/mobile/components/Backdrop.tsx +++ b/mobile/components/Backdrop.tsx @@ -5,13 +5,11 @@ interface BackdropProps { message?: string } -function Backdrop({ message }: BackdropProps) { - return ( +const Backdrop = ({ message }: BackdropProps) => ( {message && {message}} ) -} const styles = StyleSheet.create({ container: { diff --git a/mobile/components/Booking.tsx b/mobile/components/Booking.tsx index cdb701d6..a0fb80cc 100644 --- a/mobile/components/Booking.tsx +++ b/mobile/components/Booking.tsx @@ -29,12 +29,12 @@ const iconColor = '#000' const extraIconColor = '#1f9201' const extraIconSize = 16 -function Booking({ +const Booking = ({ booking, locale, fr, onCancel -}: BookingProps) { +}: BookingProps) => { const from = new Date(booking.from) const to = new Date(booking.to) const property = booking.property as movininTypes.Property diff --git a/mobile/components/BookingFilter.tsx b/mobile/components/BookingFilter.tsx index 1e9f9728..aaae7349 100644 --- a/mobile/components/BookingFilter.tsx +++ b/mobile/components/BookingFilter.tsx @@ -16,12 +16,12 @@ interface BookingFilterProps { onSubmit: (filter: movininTypes.Filter) => void } -function BookingFilter({ +const BookingFilter = ({ visible, style, language, onSubmit -}: BookingFilterProps) { +}: BookingFilterProps) => { const [init, setInit] = useState(false) const [from, setFrom] = useState(undefined) const [to, setTo] = useState(undefined) diff --git a/mobile/components/BookingList.tsx b/mobile/components/BookingList.tsx index b0fd8c7b..15b16995 100644 --- a/mobile/components/BookingList.tsx +++ b/mobile/components/BookingList.tsx @@ -30,7 +30,7 @@ interface BookingListProps { header?: React.ReactElement } -function BookingList({ +const BookingList = ({ agencies, statuses, filter, @@ -38,7 +38,7 @@ function BookingList({ booking: bookingId, language, header -}: BookingListProps) { +}: BookingListProps) => { const [firstLoad, setFirstLoad] = useState(true) const [onScrollEnd, setOnScrollEnd] = useState(false) const [loading, setLoading] = useState(true) diff --git a/mobile/components/BookingStatus.tsx b/mobile/components/BookingStatus.tsx index e864e586..206f590f 100644 --- a/mobile/components/BookingStatus.tsx +++ b/mobile/components/BookingStatus.tsx @@ -9,11 +9,10 @@ interface BookingStatusProps { status: movininTypes.BookingStatus } -function BookingStatus({ +const BookingStatus = ({ style, status -}: BookingStatusProps) { - return ( +}: BookingStatusProps) => ( {Helper.getBookingStatus(status)} ) -} const styles = StyleSheet.create({ container: { diff --git a/mobile/components/Button.tsx b/mobile/components/Button.tsx index 9e60ae11..78c67e6a 100644 --- a/mobile/components/Button.tsx +++ b/mobile/components/Button.tsx @@ -9,13 +9,13 @@ interface ButtonProps { onPress?: () => void } -function Button({ +const Button = ({ size, color, style, label, onPress: onButtonPress -}: ButtonProps) { +}: ButtonProps) => { const small = size === 'small' const onPress = () => { diff --git a/mobile/components/Checkbox.tsx b/mobile/components/Checkbox.tsx index d3d8e291..68b8b23d 100644 --- a/mobile/components/Checkbox.tsx +++ b/mobile/components/Checkbox.tsx @@ -8,12 +8,11 @@ interface CheckboxProps { onChange?: (_checked: boolean) => void } -function Checkbox({ +const Checkbox = ({ indeterminate, checked, onChange -}: CheckboxProps) { - return ( +}: CheckboxProps) => ( { if (onChange) { @@ -26,7 +25,6 @@ function Checkbox({ ) -} const styles = StyleSheet.create({ checkbox: { diff --git a/mobile/components/DateTimePicker.tsx b/mobile/components/DateTimePicker.tsx index 4a979afd..6b0e3468 100644 --- a/mobile/components/DateTimePicker.tsx +++ b/mobile/components/DateTimePicker.tsx @@ -31,7 +31,7 @@ interface DateTimePickerProps { onChange?: (date: Date | undefined) => void } -function DateTimePicker({ +const DateTimePicker = ({ value: dateTimeValue, locale: dateTimeLocale, mode, @@ -48,7 +48,7 @@ function DateTimePicker({ hidePickerMessage, onPress, onChange -}: DateTimePickerProps) { +}: DateTimePickerProps) => { const [label, setLabel] = useState('') const [value, setValue] = useState(dateTimeValue) const [show, setShow] = useState(false) diff --git a/mobile/components/DrawerContent.tsx b/mobile/components/DrawerContent.tsx index 13123ff3..6a26f275 100644 --- a/mobile/components/DrawerContent.tsx +++ b/mobile/components/DrawerContent.tsx @@ -42,7 +42,7 @@ interface DrawerContentProps { let yOffset = 0 -function DrawerContent({ +const DrawerContent = ({ language: drawerLanguage, index, drawerItems, @@ -55,7 +55,7 @@ function DrawerContent({ labelStyle, itemStyle, props -}: DrawerContentProps) { +}: DrawerContentProps) => { const navigation = useNavigation>() const [openLanguageMenu, setopenLanguageMenu] = useState(false) const [language, setLanguage] = useState(drawerLanguage) diff --git a/mobile/components/DrawerNavigator.tsx b/mobile/components/DrawerNavigator.tsx index aef7dddd..378eaa77 100644 --- a/mobile/components/DrawerNavigator.tsx +++ b/mobile/components/DrawerNavigator.tsx @@ -24,7 +24,7 @@ import DrawerContent from './DrawerContent' import CheckoutScreen from '../screens/Checkout' import NotificationsScreen from '../screens/NotificationsScreen' -function DrawerNavigator() { +const DrawerNavigator = () => { const routes = useNavigationState((state) => state && state.routes) const index = useNavigationState((state) => state && state.index) const [loggedIn, setLoggedIn] = useState(false) diff --git a/mobile/components/Error.tsx b/mobile/components/Error.tsx index a4441f01..9da1c59a 100644 --- a/mobile/components/Error.tsx +++ b/mobile/components/Error.tsx @@ -6,16 +6,14 @@ interface ErrorProps { message: string } -function Error({ +const Error = ({ style, message -}: ErrorProps) { - return ( +}: ErrorProps) => ( {message} ) -} const styles = StyleSheet.create({ text: { diff --git a/mobile/components/Header.tsx b/mobile/components/Header.tsx index 18e9ccbe..c6ec53a6 100644 --- a/mobile/components/Header.tsx +++ b/mobile/components/Header.tsx @@ -23,14 +23,14 @@ interface HeaderProps { _avatar?: string | null } -function Header({ +const Header = ({ title, hideTitle, loggedIn, notificationCount, reload, _avatar -}: HeaderProps) { +}: HeaderProps) => { const navigation = useNavigation>() const [avatar, setAvatar] = useState(null) diff --git a/mobile/components/Link.tsx b/mobile/components/Link.tsx index 8a31b9a7..bc64737a 100644 --- a/mobile/components/Link.tsx +++ b/mobile/components/Link.tsx @@ -8,12 +8,12 @@ interface LinkProps { onPress?: () => void } -function Link({ +const Link = ({ style, textStyle, label, onPress: onLinkPress -}: LinkProps) { +}: LinkProps) => { const onPress = () => { if (onLinkPress) { onLinkPress() diff --git a/mobile/components/LocationSelectList.tsx b/mobile/components/LocationSelectList.tsx index 7b6ee541..4992ca38 100644 --- a/mobile/components/LocationSelectList.tsx +++ b/mobile/components/LocationSelectList.tsx @@ -21,7 +21,7 @@ interface LocationSelectListProps { onFocus?: () => void } -function LocationSelectList({ +const LocationSelectList = ({ selectedItem: listSelectedItem, size, style, @@ -33,7 +33,7 @@ function LocationSelectList({ onFetch, onChangeText: listOnChangeText, onFocus -}: LocationSelectListProps) { +}: LocationSelectListProps) => { const [loading, setLoading] = useState(false) const [rows, setRows] = useState([]) const [selectedItem, setSelectedItem] = useState() diff --git a/mobile/components/Master.tsx b/mobile/components/Master.tsx index 58bbb180..9b0b0621 100644 --- a/mobile/components/Master.tsx +++ b/mobile/components/Master.tsx @@ -25,7 +25,7 @@ interface MasterProps { onLoad: (user?: movininTypes.User) => void } -function Master({ +const Master = ({ navigation, strict, route, @@ -37,7 +37,7 @@ function Master({ avatar, children, onLoad -}: MasterProps) { +}: MasterProps) => { const [loading, setLoading] = useState(true) const [user, setUser] = useState(null) const [loggedIn, setLoggedIn] = useState(false) diff --git a/mobile/components/Property.tsx b/mobile/components/Property.tsx index 0bd7ff28..d399ee72 100644 --- a/mobile/components/Property.tsx +++ b/mobile/components/Property.tsx @@ -31,14 +31,14 @@ const iconColor = '#000' const getExtraIcon = (extra: number) => (extra === -1 ? 'clear' : extra === 0 ? 'check' : 'info') -function Property({ +const Property = ({ property, fr, from, to, location, navigation -}: PropertyProps) { +}: PropertyProps) => { const { width } = useWindowDimensions() const days = movininHelper.days(from, to) const price = Helper.price(property, from, to) diff --git a/mobile/components/PropertyList.tsx b/mobile/components/PropertyList.tsx index 843d3ffe..b9f8835e 100644 --- a/mobile/components/PropertyList.tsx +++ b/mobile/components/PropertyList.tsx @@ -28,7 +28,7 @@ interface PropertyListProps { onLoad?: movininTypes.DataEvent } -function PropertyList({ +const PropertyList = ({ navigation, from, to, @@ -38,7 +38,7 @@ function PropertyList({ rentalTerms, header, onLoad -}: PropertyListProps) { +}: PropertyListProps) => { const [language, setLanguage] = useState(Env.DEFAULT_LANGUAGE) const [onScrollEnd, setOnScrollEnd] = useState(false) const [loading, setLoading] = useState(true) diff --git a/mobile/components/PropertyTypeFilter.tsx b/mobile/components/PropertyTypeFilter.tsx index 6b756dca..31ca1bec 100644 --- a/mobile/components/PropertyTypeFilter.tsx +++ b/mobile/components/PropertyTypeFilter.tsx @@ -14,11 +14,11 @@ interface PropertyTypeFilterProps { onChange?: (values: movininTypes.PropertyType[]) => void } -function PropertyTypeFilter({ +const PropertyTypeFilter = ({ visible, style, onChange -}: PropertyTypeFilterProps) { +}: PropertyTypeFilterProps) => { const allPropertyTypes = movininHelper.getAllPropertyTypes() const [values, setValues] = useState(allPropertyTypes) diff --git a/mobile/components/RadioButton.tsx b/mobile/components/RadioButton.tsx index 23845408..4152d102 100644 --- a/mobile/components/RadioButton.tsx +++ b/mobile/components/RadioButton.tsx @@ -15,13 +15,13 @@ interface RadioButtonProps { onValueChange?: (_checked: boolean) => void } -function RadioButton({ +const RadioButton = ({ checked, style, textStyle, label, onValueChange: onRadioButtonValueChange -}: RadioButtonProps) { +}: RadioButtonProps) => { const onPress = () => { if (onRadioButtonValueChange) { onRadioButtonValueChange(!checked) diff --git a/mobile/components/RentalTermFilter.tsx b/mobile/components/RentalTermFilter.tsx index 3cbd5313..66251589 100644 --- a/mobile/components/RentalTermFilter.tsx +++ b/mobile/components/RentalTermFilter.tsx @@ -14,11 +14,11 @@ interface RentalTermFilterProps { onChange?: (values: movininTypes.RentalTerm[]) => void } -function RentalTermFilter({ +const RentalTermFilter = ({ visible, style, onChange -}: RentalTermFilterProps) { +}: RentalTermFilterProps) => { const allRentalTerms = movininHelper.getAllRentalTerms() const [values, setValues] = useState(allRentalTerms) diff --git a/mobile/components/StatusFilter.tsx b/mobile/components/StatusFilter.tsx index 98ea0e8a..588a5cdf 100644 --- a/mobile/components/StatusFilter.tsx +++ b/mobile/components/StatusFilter.tsx @@ -17,12 +17,12 @@ interface StatusFilterProps { onChange?: (checkedStatuses: movininTypes.BookingStatus[]) => void } -function StatusFilter({ +const StatusFilter = ({ visible, style, onLoad, onChange -}: StatusFilterProps) { +}: StatusFilterProps) => { const [statuses, setStatuses] = useState( Helper.getBookingStatuses().map((status) => ({ ...status, checked: true })) ) diff --git a/mobile/components/Switch.tsx b/mobile/components/Switch.tsx index fd368173..38a9ac15 100644 --- a/mobile/components/Switch.tsx +++ b/mobile/components/Switch.tsx @@ -17,7 +17,7 @@ interface SwitchProps { onValueChange?: (value: boolean) => void } -function Switch({ +const Switch = ({ value: switchValue, style, textStyle, @@ -25,7 +25,7 @@ function Switch({ disabled, children, onValueChange: onSwitchValueChange -}: SwitchProps) { +}: SwitchProps) => { const [value, setValue] = useState(switchValue) useEffect(() => { diff --git a/mobile/components/TextInput.tsx b/mobile/components/TextInput.tsx index 65350e81..156b5a49 100644 --- a/mobile/components/TextInput.tsx +++ b/mobile/components/TextInput.tsx @@ -32,10 +32,10 @@ interface TextInputProps { onChangeText?: (text: string) => void } -function TextInputComponent( - props: TextInputProps, +const TextInputComponent = ( +props: TextInputProps, ref: React.ForwardedRef -) { +) => { const [value, setValue] = useState('') const _ref = useRef(null) const small = props.size === 'small' diff --git a/mobile/package-lock.json b/mobile/package-lock.json index a4f37efd..4e858a72 100644 --- a/mobile/package-lock.json +++ b/mobile/package-lock.json @@ -22,7 +22,7 @@ "axios": "^1.6.7", "axios-retry": "^4.0.0", "date-fns": "^3.3.1", - "expo": "~50.0.7", + "expo": "~50.0.8", "expo-asset": "~9.0.2", "expo-constants": "~15.4.5", "expo-device": "~5.9.3", @@ -2207,9 +2207,9 @@ } }, "node_modules/@expo/cli": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@expo/cli/-/cli-0.17.5.tgz", - "integrity": "sha512-9cMquL/5bBfV73CbZcWipk3KZSo8mBqdgvkoWCtEtnnlm/879ayxzMWjVIgT5yV4w+X7+N6KkBSUIIj4t9Xqew==", + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@expo/cli/-/cli-0.17.6.tgz", + "integrity": "sha512-vpwQOyhkqQ5Ao96AGaFntRf6dX7h7/e9T7oKZ5KfJiaLRgfmNa/yHFu5cpXG76T2R7Q6aiU4ik0KU3P7nFMzEw==", "dependencies": { "@babel/runtime": "^7.20.0", "@expo/code-signing-certificates": "0.0.5", @@ -3043,9 +3043,9 @@ } }, "node_modules/@expo/metro-config": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/@expo/metro-config/-/metro-config-0.17.4.tgz", - "integrity": "sha512-PxqDMuVjXQeboa6Aj8kNj4iTxIpwpfoYlF803qOjf1LE1ePlREnWNwqy65ESCBnCmekYIO5hhm1Nksa+xCvuyg==", + "version": "0.17.5", + "resolved": "https://registry.npmjs.org/@expo/metro-config/-/metro-config-0.17.5.tgz", + "integrity": "sha512-2YUebeIwr6gFxcIRSVAjWK5D8YSaXBzQoRRl3muJWsH8AC8a+T60xbA3cGhsEICD2zKS5zwnL2yobgs41Ur7nQ==", "dependencies": { "@babel/core": "^7.20.0", "@babel/generator": "^7.20.5", @@ -9051,19 +9051,19 @@ } }, "node_modules/expo": { - "version": "50.0.7", - "resolved": "https://registry.npmjs.org/expo/-/expo-50.0.7.tgz", - "integrity": "sha512-lTqIrKOUTKHLdTuAaJzZihi1v7F8Ix1dOXVWMpToDy9zPC/s+fet0fbyXdFUxYsCUyuEDIB9tvejrTYZk8Hm0Q==", + "version": "50.0.8", + "resolved": "https://registry.npmjs.org/expo/-/expo-50.0.8.tgz", + "integrity": "sha512-8yXsoMbFRjWyEDNuFRtH0vTFvEjFnnwP+LceS6xmXGp+IW1hKdN1X6Bj1EUocFtepH0ruHDPCof1KvPoWfUWkw==", "dependencies": { "@babel/runtime": "^7.20.0", - "@expo/cli": "0.17.5", + "@expo/cli": "0.17.6", "@expo/config": "8.5.4", "@expo/config-plugins": "7.8.4", - "@expo/metro-config": "0.17.4", + "@expo/metro-config": "0.17.5", "@expo/vector-icons": "^14.0.0", "babel-preset-expo": "~10.0.1", "expo-asset": "~9.0.2", - "expo-file-system": "~16.0.6", + "expo-file-system": "~16.0.7", "expo-font": "~11.10.3", "expo-keep-awake": "~12.8.2", "expo-modules-autolinking": "1.10.3", @@ -9124,9 +9124,9 @@ "integrity": "sha512-SY7rVFxb4ut/OMTgR7A39Jg+8+hXwQNRpZd+RBpB+B5XV2STj/pWXHnGFhBayEF4umI4SxrOvisY90rlPWVO9Q==" }, "node_modules/expo-file-system": { - "version": "16.0.6", - "resolved": "https://registry.npmjs.org/expo-file-system/-/expo-file-system-16.0.6.tgz", - "integrity": "sha512-ATCHL7nEg2WwKeamW/SDTR9jBEqM5wncFq594ftKS5QFmhKIrX48d9jyPFGnNq+6h8AGPg4QKh2KCA4OY49L4g==", + "version": "16.0.7", + "resolved": "https://registry.npmjs.org/expo-file-system/-/expo-file-system-16.0.7.tgz", + "integrity": "sha512-BELr1Agj6WK0PKVMcD0rqC3fP5unKfp2KW8/sNhtTHgdzQ/F0Pylq9pTk9u7KEu0ZbEdTpk5EMarLMPwffi3og==", "peerDependencies": { "expo": "*" } diff --git a/mobile/package.json b/mobile/package.json index 6919fa0d..c0ad6d7e 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -14,7 +14,8 @@ "build:ios:local": "cross-env EAS_NO_VCS=1 eas build --profile production --platform ios --local", "build:ios:preview": "cross-env EAS_NO_VCS=1 eas build --profile preview --platform android", "ts:check": "tsc", - "lint": "eslint --ext .ts,.tsx ." + "lint": "eslint --ext .ts,.tsx .", + "fix": "eslint --fix ." }, "dependencies": { "@react-native-async-storage/async-storage": "1.21.0", @@ -31,7 +32,7 @@ "axios": "^1.6.7", "axios-retry": "^4.0.0", "date-fns": "^3.3.1", - "expo": "~50.0.7", + "expo": "~50.0.8", "expo-asset": "~9.0.2", "expo-constants": "~15.4.5", "expo-device": "~5.9.3", diff --git a/mobile/screens/AboutScreen.tsx b/mobile/screens/AboutScreen.tsx index b1160eb1..56e11b47 100644 --- a/mobile/screens/AboutScreen.tsx +++ b/mobile/screens/AboutScreen.tsx @@ -7,7 +7,7 @@ import i18n from '../lang/i18n' import * as UserService from '../services/UserService' import Master from '../components/Master' -function AboutScreen({ navigation, route }: NativeStackScreenProps) { +const AboutScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [reload, setReload] = useState(false) const [visible, setVisible] = useState(false) diff --git a/mobile/screens/BookingScreen.tsx b/mobile/screens/BookingScreen.tsx index 619b6504..ed1d85c6 100644 --- a/mobile/screens/BookingScreen.tsx +++ b/mobile/screens/BookingScreen.tsx @@ -10,7 +10,7 @@ import Master from '../components/Master' import BookingList from '../components/BookingList' import * as Env from '../config/env.config' -function BookingScreen({ navigation, route }: NativeStackScreenProps) { +const BookingScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [language, setLanguage] = useState(Env.DEFAULT_LANGUAGE) const [reload, setReload] = useState(false) diff --git a/mobile/screens/BookingsScreen.tsx b/mobile/screens/BookingsScreen.tsx index 9f25e1aa..a9b93bd6 100644 --- a/mobile/screens/BookingsScreen.tsx +++ b/mobile/screens/BookingsScreen.tsx @@ -14,7 +14,7 @@ import StatusFilter from '../components/StatusFilter' import * as BookingService from '../services/BookingService' import BookingFilter from '../components/BookingFilter' -function BookingsScreen({ navigation, route }: NativeStackScreenProps) { +const BookingsScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [language, setLanguage] = useState(Env.DEFAULT_LANGUAGE) const [reload, setReload] = useState(false) diff --git a/mobile/screens/ChangePasswordScreen.tsx b/mobile/screens/ChangePasswordScreen.tsx index fef2b912..42d4b4a5 100644 --- a/mobile/screens/ChangePasswordScreen.tsx +++ b/mobile/screens/ChangePasswordScreen.tsx @@ -16,7 +16,7 @@ import * as Helper from '../common/Helper' import TextInput from '../components/TextInput' import Button from '../components/Button' -function ChangePasswordScreen({ navigation, route }: NativeStackScreenProps) { +const ChangePasswordScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [reload, setReload] = useState(false) const [visible, setVisible] = useState(false) diff --git a/mobile/screens/Checkout.tsx b/mobile/screens/Checkout.tsx index 240e0ed5..d1637784 100644 --- a/mobile/screens/Checkout.tsx +++ b/mobile/screens/Checkout.tsx @@ -33,7 +33,7 @@ import * as BookingService from '../services/BookingService' import * as Env from '../config/env.config' import Backdrop from '../components/Backdrop' -function CheckoutScreen({ navigation, route }: NativeStackScreenProps) { +const CheckoutScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [reload, setReload] = useState(false) const [visible, setVisible] = useState(false) diff --git a/mobile/screens/ContactScreen.tsx b/mobile/screens/ContactScreen.tsx index 30d33fcd..d8e5b099 100644 --- a/mobile/screens/ContactScreen.tsx +++ b/mobile/screens/ContactScreen.tsx @@ -7,7 +7,7 @@ import i18n from '../lang/i18n' import * as UserService from '../services/UserService' import Master from '../components/Master' -function ContactScreen({ navigation, route }: NativeStackScreenProps) { +const ContactScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [reload, setReload] = useState(false) const [visible, setVisible] = useState(false) diff --git a/mobile/screens/ForgotPasswordScreen.tsx b/mobile/screens/ForgotPasswordScreen.tsx index 4409b4cf..ed73b966 100644 --- a/mobile/screens/ForgotPasswordScreen.tsx +++ b/mobile/screens/ForgotPasswordScreen.tsx @@ -19,7 +19,7 @@ import * as Helper from '../common/Helper' import Link from '../components/Link' import Header from '../components/Header' -function ForgotPasswordScreen({ navigation, route }: NativeStackScreenProps) { +const ForgotPasswordScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [email, setEmail] = useState('') const [emailRequired, setEmailRequired] = useState(false) diff --git a/mobile/screens/HomeScreen.tsx b/mobile/screens/HomeScreen.tsx index a01d63fa..ad7083f9 100644 --- a/mobile/screens/HomeScreen.tsx +++ b/mobile/screens/HomeScreen.tsx @@ -19,7 +19,7 @@ import Button from '../components/Button' import LocationSelectList from '../components/LocationSelectList' import DateTimePicker from '../components/DateTimePicker' -function HomeScreen({ navigation, route }: NativeStackScreenProps) { +const HomeScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const _minDate = new Date() diff --git a/mobile/screens/NotificationsScreen.tsx b/mobile/screens/NotificationsScreen.tsx index e655d3cc..4b2f9451 100644 --- a/mobile/screens/NotificationsScreen.tsx +++ b/mobile/screens/NotificationsScreen.tsx @@ -29,7 +29,7 @@ import * as Env from '../config/env.config' import * as Helper from '../common/Helper' import Checkbox from '../components/Checkbox' -function NotificationsScreen({ navigation, route }: NativeStackScreenProps) { +const NotificationsScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [reload, setReload] = useState(false) const [visible, setVisible] = useState(false) diff --git a/mobile/screens/PropertiesScreen.tsx b/mobile/screens/PropertiesScreen.tsx index 601bfc6b..d4052abc 100644 --- a/mobile/screens/PropertiesScreen.tsx +++ b/mobile/screens/PropertiesScreen.tsx @@ -13,7 +13,7 @@ import AgencyFilter from '../components/AgencyFilter' import RentalTermFilter from '../components/RentalTermFilter' import PropertyTypeFilter from '../components/PropertyTypeFilter' -function PropertiesScreen({ navigation, route }: NativeStackScreenProps) { +const PropertiesScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [reload, setReload] = useState(false) const [loaded, setLoaded] = useState(false) diff --git a/mobile/screens/SettingsScreen.tsx b/mobile/screens/SettingsScreen.tsx index 2362dd02..2c0e15cf 100644 --- a/mobile/screens/SettingsScreen.tsx +++ b/mobile/screens/SettingsScreen.tsx @@ -31,7 +31,7 @@ import Button from '../components/Button' import * as Helper from '../common/Helper' import * as Env from '../config/env.config' -function SettingsScreen({ navigation, route }: NativeStackScreenProps) { +const SettingsScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [reload, setReload] = useState(false) const [visible, setVisible] = useState(false) diff --git a/mobile/screens/SignInScreen.tsx b/mobile/screens/SignInScreen.tsx index 78481695..5a6dd8d9 100644 --- a/mobile/screens/SignInScreen.tsx +++ b/mobile/screens/SignInScreen.tsx @@ -20,7 +20,7 @@ import * as Helper from '../common/Helper' import Switch from '../components/Switch' import Header from '../components/Header' -function SignInScreen({ navigation, route }: NativeStackScreenProps) { +const SignInScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [email, setEmail] = useState('') const [password, setPassword] = useState('') diff --git a/mobile/screens/SignUpScreen.tsx b/mobile/screens/SignUpScreen.tsx index 95bdd33a..9ef3b7e4 100644 --- a/mobile/screens/SignUpScreen.tsx +++ b/mobile/screens/SignUpScreen.tsx @@ -22,7 +22,7 @@ import Error from '../components/Error' import Backdrop from '../components/Backdrop' import Header from '../components/Header' -function SignUpScreen({ navigation, route }: NativeStackScreenProps) { +const SignUpScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [language, setLanguage] = useState(Env.DEFAULT_LANGUAGE) const [fullName, setFullName] = useState('') diff --git a/mobile/screens/ToSScreen.tsx b/mobile/screens/ToSScreen.tsx index 6984701a..c6a6ac65 100644 --- a/mobile/screens/ToSScreen.tsx +++ b/mobile/screens/ToSScreen.tsx @@ -7,7 +7,7 @@ import i18n from '../lang/i18n' import * as UserService from '../services/UserService' import Master from '../components/Master' -function ToSScreen({ navigation, route }: NativeStackScreenProps) { +const ToSScreen = ({ navigation, route }: NativeStackScreenProps) => { const isFocused = useIsFocused() const [reload, setReload] = useState(false)