import { LocationObject } from "expo-location" import { useAppDispatch, useAppSelector } from "./useStore" import { setLocation } from "@/utils/features/location/locationSlice" export const useLocation = () => useAppSelector((state) => state.location.location) export const useSetLocation = () => (location: LocationObject) => { const dispatch = useAppDispatch() dispatch(setLocation(location)) }