auth work
This commit is contained in:
@@ -14,7 +14,7 @@ interface TrackerProps {
|
||||
|
||||
export const TrackerProvider = ({children}: PropsWithChildren) => {
|
||||
const [currentTimeTracker, setCurrentTimeTracker] = useState<timeTracker|null>(null)
|
||||
const {axiosGet, axiosPost, axiosDelete} = useAxiosTools()
|
||||
const {axiosGet, axiosPost, axiosDelete, errorCatch} = useAxiosTools()
|
||||
|
||||
useEffect(() => {
|
||||
fetchCurrentTimeTracker()
|
||||
@@ -25,7 +25,7 @@ export const TrackerProvider = ({children}: PropsWithChildren) => {
|
||||
const res = await axiosGet(`/api/time-trackers/user`)
|
||||
setCurrentTimeTracker(res.data)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
errorCatch(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user