This commit is contained in:
2024-08-16 20:44:13 +05:30
parent aa1c0c994a
commit dfbc1ad338
4 changed files with 7 additions and 7 deletions

View File

@@ -81,7 +81,7 @@ const IOCashDetails = () => {
const searchLower = searchTerm.toLowerCase();
const nameMatches = name.toLowerCase().includes(searchLower);
return nameMatches;
});
}).sort((b, a) => new Date(a.createdAt) - new Date(b.createdAt));
const extractedArray = filteredData?.map((item, index) => ({

View File

@@ -54,7 +54,7 @@ const IONAVDetails = () => {
const searchLower = searchTerm.toLowerCase();
const nameMatches = name.toLowerCase().includes(searchLower);
return nameMatches;
});
}).sort((b, a) => new Date(a.transactionDate) - new Date(b.transactionDate));
const extractedArray=filteredData?.map((item, index) => ({
id: item?.id,

View File

@@ -3,7 +3,7 @@ import axios from "axios";
// Create an Axios instance for API calls
export const api = axios.create({
// baseURL: `https://tanami.betadelivery.com/api/v1`,
baseURL: `https://sprint4.tanami.betadelivery.com/api/v1`, // Replace with your API base URL
baseURL: `https://admin.tanami.betadelivery.com/api/v1`, // Replace with your API base URL
timeout: 10000, // Adjust timeout as needed
headers: {
"Content-Type": "application/json",

View File

@@ -2,7 +2,7 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';
// Define a base query function with RTK Query
// export const baseQuery = fetchBaseQuery({
// baseUrl: 'https://sprint4.tanami.betadelivery.com/api/v1',
// baseUrl: 'https://admin.tanami.betadelivery.com/api/v1',
// prepareHeaders: (headers) => {
// const token = localStorage.getItem('accessToken');
// if (token) {
@@ -18,7 +18,7 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';
// Define a base query function with token refresh logic
export const baseQuery = async (args, api, extraOptions) => {
let result = await fetchBaseQuery({
baseUrl: 'https://sprint4.tanami.betadelivery.com/api/v1',
baseUrl: 'https://admin.tanami.betadelivery.com/api/v1',
prepareHeaders: (headers) => {
const token = localStorage.getItem('accessToken');
if (token) {
@@ -34,7 +34,7 @@ export const baseQuery = async (args, api, extraOptions) => {
if (refreshToken) {
try {
const refreshResult = await fetchBaseQuery({
baseUrl: 'https://sprint4.tanami.betadelivery.com/api/v1',
baseUrl: 'https://admin.tanami.betadelivery.com/api/v1',
})({
url: '/auth/user/regenerate-token',
method: 'POST',
@@ -50,7 +50,7 @@ export const baseQuery = async (args, api, extraOptions) => {
// Retry the original request with the new token
result = await fetchBaseQuery({
baseUrl: 'https://sprint4.tanami.betadelivery.com/api/v1',
baseUrl: 'https://admin.tanami.betadelivery.com/api/v1',
prepareHeaders: (headers) => {
const token = localStorage.getItem('accessToken');
if (token) {