Merge branch 'main' into tracker-connect-back
# Conflicts: # src/assets/images/accept.png # src/assets/images/mainTaskCommentImg.png # src/components/Modal/TrackerModal/TrackerModal.jsx # src/components/UI/ModalTicket/ModalTicket.jsx # src/components/UI/TicketFullScreen/TicketFullScreen.jsx # src/pages/ProjectTracker/ProjectTracker.js # src/redux/projectsTrackerSlice.js
This commit is contained in:
commit
5c742411d5
549 files changed
+8228
-8502
No files matched your search
+4
-4
@@ -12,11 +12,11 @@ import Home from "./pages/Home/Home";
|
||||
import Candidate from "./components/Candidate/Candidate";
|
||||
import Calendar from "./components/Calendar/Calendar";
|
||||
import ReportForm from "./components/ReportForm/ReportForm";
|
||||
import FreeDevelopers from "./components/UI/FreeDevelopers/FreeDevelopers";
|
||||
import { TicketFullScreen } from "./components/UI/TicketFullScreen/TicketFullScreen";
|
||||
import FreeDevelopers from "./components/FreeDevelopers/FreeDevelopers";
|
||||
import { TicketFullScreen } from "./components/Modal/Tracker/TicketFullScreen/TicketFullScreen";
|
||||
import { ProfileCalendar } from "./components/ProfileCalendar/ProfileCalendar";
|
||||
import Article from "./pages/Article/Article";
|
||||
import FormPage from "./pages/FormPage/FormPage.js";
|
||||
import FormPage from "./pages/FormPage/FormPage";
|
||||
import SingleReportPage from "./pages/SingleReportPage/SingleReportPage";
|
||||
import { QuizPage } from "./pages/quiz/QuizPage";
|
||||
import { QuizReportPage } from "./pages/quiz/QuizReportPage";
|
||||
@@ -42,7 +42,7 @@ import { FrequentlyAskedQuestions } from "./pages/FrequentlyAskedQuestions/Frequ
|
||||
import { FrequentlyAskedQuestion } from "./pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion";
|
||||
|
||||
import "./assets/global.scss";
|
||||
import "./fonts/stylesheet.css";
|
||||
import "./assets/fonts/stylesheet.css";
|
||||
import "bootstrap/dist/css/bootstrap.min.css";
|
||||
|
||||
const App = () => {
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
export default axios.create({
|
||||
baseURL: process.env.REACT_APP_API_URL
|
||||
});
|
||||
baseURL: process.env.REACT_APP_API_URL,
|
||||
});
|
||||
+36
-30
@@ -1,7 +1,6 @@
|
||||
import axios from 'axios';
|
||||
import {getToken, urlHasParams} from "../helper";
|
||||
|
||||
import axios from "axios";
|
||||
|
||||
import { getToken, urlHasParams } from "@utils/helper";
|
||||
|
||||
const instance = axios.create({
|
||||
baseURL: process.env.REACT_APP_API_URL,
|
||||
@@ -10,40 +9,47 @@ const instance = axios.create({
|
||||
},
|
||||
});
|
||||
|
||||
export const apiRequest = (url, {
|
||||
method = 'get', params, data,
|
||||
headers = {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
} = {}) => {
|
||||
const fullHeaders = {...headers, ...getToken()};
|
||||
export const apiRequest = (
|
||||
url,
|
||||
{
|
||||
method = "get",
|
||||
params,
|
||||
data,
|
||||
headers = {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
} = {}
|
||||
) => {
|
||||
const fullHeaders = { ...headers, ...getToken() };
|
||||
let urWithParams = urlHasParams(url);
|
||||
|
||||
|
||||
return instance
|
||||
.request({
|
||||
url: urWithParams,
|
||||
method,
|
||||
params,
|
||||
data,
|
||||
headers: {...fullHeaders},
|
||||
})
|
||||
.then(response => new Promise(resolve => {
|
||||
if (response.data.redirect || response.status === 401) {
|
||||
window.location.replace('/auth');
|
||||
localStorage.clear();
|
||||
// dispatch(auth(false));
|
||||
}
|
||||
return resolve(response)
|
||||
}))
|
||||
.then(response => new Promise(resolve => resolve(response.data)))
|
||||
.request({
|
||||
url: urWithParams,
|
||||
method,
|
||||
params,
|
||||
data,
|
||||
headers: { ...fullHeaders },
|
||||
})
|
||||
.then(
|
||||
(response) =>
|
||||
new Promise((resolve) => {
|
||||
if (response.data.redirect || response.status === 401) {
|
||||
window.location.replace("/auth");
|
||||
localStorage.clear();
|
||||
// dispatch(auth(false));
|
||||
}
|
||||
return resolve(response);
|
||||
})
|
||||
)
|
||||
.then((response) => new Promise((resolve) => resolve(response.data)));
|
||||
};
|
||||
|
||||
const RequestError = (code, msg, data) => {
|
||||
const description = msg ? `- ${msg}` : '';
|
||||
const description = msg ? `- ${msg}` : "";
|
||||
|
||||
this.name = 'RequestError';
|
||||
this.name = "RequestError";
|
||||
this.message = `API returned: ${code}${description}.`;
|
||||
this.code = code;
|
||||
this.description = msg;
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 549 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user