create address + fix location restaurant
This commit is contained in:
@@ -27,8 +27,9 @@ const processQueue = (error: unknown, token: string | null = null) => {
|
||||
|
||||
// Attach access token to requests
|
||||
api.interceptors.request.use((config) => {
|
||||
const state = useAuthStore.getState();
|
||||
const token = state.user?.accessToken;
|
||||
const token = localStorage.getItem(
|
||||
process.env.NEXT_PUBLIC_TOKEN_NAME as string
|
||||
);
|
||||
|
||||
if (token) {
|
||||
config.headers = config.headers || {};
|
||||
|
||||
Reference in New Issue
Block a user