import { Dispatch, SetStateAction } from 'react'; /** * A hook used to set the property view in the url search params for example * `/properties/sales?view=list`. This allows components like the property * results to be updated based on the view that is set. * * If the defaultView is set the hook removes the view from the search params. * For example if the defaultView is 'grid' the `view=grid` will not been shown in the * search params. * * Implementation: * @example * ``` * const [currentPropertiesView, setCurrentPropertiesView] = usePropertiesView(); * * return ( *
*

The current properties view is {currentPropertiesView}

* *
* ) * * ``` * * You can also access the view by using `searchParams.get` in other components, rather than * passing down `currentPropertiesView` (shown in the example above) as a prop. * * ``` * const view = searchParams.get('view') || 'grid'; * * return ( *
* Property results... *
* ) * ``` */ export default function usePropertiesView(defaultView?: 'grid' | 'list' | 'map'): [string, Dispatch>]; //# sourceMappingURL=use-properties-view.d.ts.map