feat: converting space app to use nextjs app dir (#4451)
* feat: changemod space * fix: space app dir fixes * fix: build errors
This commit is contained in:
parent
087d54a261
commit
febf19ccc0
98 changed files with 1038 additions and 1551 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import axios, { AxiosInstance } from "axios";
|
||||
// store
|
||||
import { rootStore } from "@/lib/store-context";
|
||||
// import { rootStore } from "@/lib/store-context";
|
||||
|
||||
abstract class APIService {
|
||||
protected baseURL: string;
|
||||
|
|
@ -18,14 +18,14 @@ abstract class APIService {
|
|||
}
|
||||
|
||||
private setupInterceptors() {
|
||||
this.axiosInstance.interceptors.response.use(
|
||||
(response) => response,
|
||||
(error) => {
|
||||
const store = rootStore;
|
||||
if (error.response && error.response.status === 401 && store.user.data) store.user.reset();
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
// this.axiosInstance.interceptors.response.use(
|
||||
// (response) => response,
|
||||
// (error) => {
|
||||
// const store = rootStore;
|
||||
// if (error.response && error.response.status === 401 && store.user.data) store.user.reset();
|
||||
// return Promise.reject(error);
|
||||
// }
|
||||
// );
|
||||
}
|
||||
|
||||
get(url: string, params = {}) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import APIService from "@/services/api.service";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
|
||||
class IssueService extends APIService {
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import APIService from "@/services/api.service";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
|
||||
class ProjectService extends APIService {
|
||||
constructor() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue