final Commit
This commit is contained in:
@@ -175,7 +175,7 @@ const Investors = ({data}) => {
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{/* {`$${formatCurrency(item.InvestedAmount_USD)}`} */}
|
||||
{`$${parseFloat(item.InvestedAmount_USD||0).toFixed(2).toLocaleString()}`}
|
||||
{`$${parseFloat(item.InvestedAmount_USD||0).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`}
|
||||
</Text>
|
||||
),
|
||||
"Percentage": (
|
||||
@@ -197,7 +197,7 @@ const Investors = ({data}) => {
|
||||
fontWeight={"500"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{`$${parseFloat(item.Market_Value ||0).toFixed(2)?.toLocaleString()}`}
|
||||
{`$${parseFloat(item.Market_Value ||0).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`}
|
||||
</Text>
|
||||
),
|
||||
"Return on Investment": (
|
||||
@@ -221,7 +221,7 @@ const Investors = ({data}) => {
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{/* {`$${item.Distribution_Amt}`} */}
|
||||
{`$${parseFloat(item.Distribution_Amt||0).toFixed(2).toLocaleString()}`}
|
||||
{`$${parseFloat(item.Distribution_Amt||0).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`}
|
||||
</Text>
|
||||
),
|
||||
"Distribution Percent": (
|
||||
@@ -233,7 +233,7 @@ const Investors = ({data}) => {
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{/* {`$${item.Distribution_Amt}`} */}
|
||||
{`${parseFloat(item.Distribution_Per||0).toFixed(2).toLocaleString()} %`}
|
||||
{`${parseFloat(item.Distribution_Per||0).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })} %`}
|
||||
</Text>
|
||||
),
|
||||
"Total Return": (
|
||||
@@ -245,7 +245,7 @@ const Investors = ({data}) => {
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{/* {`$${formatCurrency(item.Total_Return) || 0}`} */}
|
||||
{`$${parseFloat(item.Total_Return||0).toFixed(2).toLocaleString()}`}
|
||||
{`$${parseFloat(item.Total_Return||0).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`}
|
||||
</Text>
|
||||
),
|
||||
"Total return on Investment": (
|
||||
|
||||
@@ -52,9 +52,9 @@ const AmountInvested = ({ isOpen, onClose }) => {
|
||||
const [amountInvested] = useAmountIvestmentMutation();
|
||||
|
||||
useEffect(() => {
|
||||
if (IODetails?.goalAmount) {
|
||||
const totalAmount = parseFloat(IODetails.goalAmount);
|
||||
const ioCashUpdate = parseFloat(IODetails.goalAmount)
|
||||
if (IODetails?.totalAmtInvestmentInUSD) {
|
||||
const totalAmount = parseFloat(IODetails.totalAmtInvestmentInUSD);
|
||||
const ioCashUpdate = parseFloat(IODetails.totalAmtInvestmentInUSD)
|
||||
reset({
|
||||
Total_Amount: totalAmount,
|
||||
IoCash: ioCashUpdate,
|
||||
@@ -90,13 +90,13 @@ const AmountInvested = ({ isOpen, onClose }) => {
|
||||
|
||||
const handleAmountChange = (e) => {
|
||||
const amount = parseFloat(e.target.value) || 0;
|
||||
const totalAmount = parseFloat(IODetails?.goalAmount) || 0;
|
||||
const totalAmount = parseFloat(IODetails?.totalAmtInvestmentInUSD) || 0;
|
||||
const ioCash = (totalAmount - amount).toFixed(2);
|
||||
|
||||
reset({
|
||||
amountInvested: parseFloat(amount),
|
||||
IoCash: parseFloat(ioCash),
|
||||
Total_Amount: IODetails?.goalAmount
|
||||
Total_Amount: IODetails?.totalAmtInvestmentInUSD
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user