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 = () => { const dispatch = useAppDispatch() return (location: LocationObject) => dispatch(setLocation(location)) }