слияние dev и tickets

This commit is contained in:
krokodilka 2023-05-08 10:29:47 +03:00
parent bff980dfc1
commit 18029e8133
4 changed files with 2 additions and 6 deletions

@ -5,7 +5,6 @@ import { authStore } from "@root/stores/auth";
const PublicRoute = ({ children }: any) => {
const location = useLocation();
const { token } = authStore();
console.log(token)
if (token) {
return <Navigate to="/users" state={{ from: location }} />;

@ -57,7 +57,6 @@ const SigninForm = () => {
useToken: false,
})
.then((e) => {
console.log(e);
navigate("/users");
})
.catch((e) => {

@ -7,7 +7,7 @@ import { getTickets, subscribeToAllTickets } from "@root/api/tickets";
import { GetTicketsRequest, Ticket } from "@root/model/ticket";
import { clearTickets, setTicketsFetchState, updateTickets, useTicketStore } from "@root/stores/tickets";
import { enqueueSnackbar } from "notistack";
import { clearMessages } from "@root/stores/messages";
import {clearMessageState } from "@root/stores/messages";
import { authStore } from "@root/stores/auth";
@ -17,7 +17,6 @@ export default function Support() {
const ticketsPerPage = useTicketStore(state => state.ticketsPerPage);
const ticketApiPage = useTicketStore(state => state.apiPage);
const { token } = authStore();
const fetchingStateRef = useRef<"idle" | "fetching" | "all fetched">("idle");
useEffect(function fetchTickets() {
const getTicketsBody: GetTicketsRequest = {
@ -67,7 +66,7 @@ export default function Support() {
return () => {
unsubscribe();
clearMessages();
clearMessageState();
clearTickets();
};
}, []);

@ -75,7 +75,6 @@ async function makeRequest<TRequest, TResponse>({
HC(data.accessToken);
}
console.log(data)
return data;
} catch (nativeError: unknown) {
const error = nativeError as AxiosError;