auth work

This commit is contained in:
Romulus21
2024-07-17 07:09:04 +02:00
parent 6be48846b0
commit a34eadb51f
13 changed files with 1125 additions and 1042 deletions

View File

@@ -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)
}
}