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}
* *