fix: re stock

This commit is contained in:
ferdiansyah783
2025-08-14 03:09:00 +07:00
parent 1d5ff78fc2
commit 274cecd1cb
12 changed files with 718 additions and 395 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import axios from 'axios'
import { toast } from 'react-toastify'
const getToken = () => {
return localStorage.getItem('authToken')
@@ -40,7 +41,7 @@ api.interceptors.response.use(
}
if (status >= 500) {
console.error('Server error:', error.response?.data?.message || 'Terjadi kesalahan server.')
toast.error(error.response?.data?.errors[0].cause || 'Terjadi kesalahan server.')
}
return Promise.reject(error)