HomeScreenController

Description

HomeScreenController types

interface HomeScreenController {
    city: string;
    currentPage: "map" | "carousel";
    displaySearchBar: boolean;
    getAllPlacesUsingSearch: (() => void);
    getNearestPlaces: (() => Place[]);
    goToFilterPage: (() => void);
    isLoading: boolean;
    isRefreshing: boolean;
    isSuccessful: boolean;
    latestPlaces: Place[];
    onRefresh: (() => void);
    places: Place[];
    searchValue: string;
    setSearchValue: ((value) => void);
    togglePage: (() => void);
    toggleSearchBar: (() => void);
}

Properties

city: string

The search of the user

currentPage: "map" | "carousel"

The current page of the screen

displaySearchBar: boolean

The display state of the search bar

getAllPlacesUsingSearch: (() => void)

Type declaration

    • (): void
    • Returns void

getNearestPlaces: (() => Place[])

The function to get the nearest places

Type declaration

goToFilterPage: (() => void)

Type declaration

    • (): void
    • Returns void

isLoading: boolean

The loading state of the screen

isRefreshing: boolean

The refreshing state of the screen

isSuccessful: boolean

The success state of the screen

latestPlaces: Place[]
onRefresh: (() => void)

The function to refresh the screen

Type declaration

    • (): void
    • Returns void

places: Place[]

The places of the user

searchValue: string

The value of the search bar

setSearchValue: ((value) => void)

The function to set the value of the search bar

Type declaration

    • (value): void
    • Parameters

      • value: string

      Returns void

togglePage: (() => void)

The function to toggle the current page of the screen

Type declaration

    • (): void
    • Returns void

toggleSearchBar: (() => void)

The function to toggle the search bar

Type declaration

    • (): void
    • Returns void