@bindu-dashing/dam-solution-v2 5.8.138 → 5.8.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,7 +12,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
12
12
|
import { createContext, useContext, useState, useEffect } from "react";
|
|
13
13
|
import { USER_LOGIN, FETCH_TEAMS_LIST, } from "../utilities/constants/apiUrls";
|
|
14
14
|
import axios from "axios";
|
|
15
|
-
import { getBaseUrl
|
|
15
|
+
import { getBaseUrl } from "./helpers";
|
|
16
16
|
import { get } from "lodash";
|
|
17
17
|
import Loader from "../common/loader/loader";
|
|
18
18
|
import { SUBSCRIPTION_EXPIRED_ERROR_MESSAGE } from "./appConstants";
|
|
@@ -76,7 +76,7 @@ export const DamConfigProvider = ({ children, config }) => {
|
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
// Get the Teams API base URL (different from MIXDRIVE_API_URL)
|
|
79
|
-
const teamsApiBaseUrl =
|
|
79
|
+
const teamsApiBaseUrl = getBaseUrl(appType);
|
|
80
80
|
const teamsEndpoint = FETCH_TEAMS_LIST.replace(":teamID", teamID);
|
|
81
81
|
const fullUrl = teamsApiBaseUrl + teamsEndpoint;
|
|
82
82
|
console.log("Fetching teams from:", fullUrl);
|
package/build/hocs/helpers.d.ts
CHANGED
|
@@ -9,13 +9,6 @@ export declare const getDateRangeFromKey: (key: string) => {
|
|
|
9
9
|
endDate?: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const getBaseUrl: (appType: string) => string;
|
|
12
|
-
/**
|
|
13
|
-
* Get the Teams API base URL from environment variable
|
|
14
|
-
* Falls back to extracting from REACT_APP_TEAMS_API_URL if available
|
|
15
|
-
* @param appType Application type (reactJs or nextJs)
|
|
16
|
-
* @returns Teams API base URL
|
|
17
|
-
*/
|
|
18
|
-
export declare const getTeamsApiBaseUrl: (appType: string) => string;
|
|
19
12
|
export declare const getRelativeTime: (timestamp: string) => string;
|
|
20
13
|
export declare const getReadableFileType: (file: FileEntity) => string;
|
|
21
14
|
export declare const humanFileSize: (size: any) => any;
|
package/build/hocs/helpers.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
2
|
import { first, get, last, split, toLower, toUpper } from "lodash";
|
|
3
3
|
import { DATE_FORMAT } from "./appConstants";
|
|
4
|
-
import { FETCH_TEAMS_LIST } from "../utilities/constants/apiUrls";
|
|
5
4
|
export const getProfileName = (name) => {
|
|
6
5
|
return name
|
|
7
6
|
? name
|
|
@@ -103,15 +102,6 @@ export const getBaseUrl = (appType) => {
|
|
|
103
102
|
return process.env.REACT_APP_MIXDRIVE_API_URL || "";
|
|
104
103
|
}
|
|
105
104
|
};
|
|
106
|
-
/**
|
|
107
|
-
* Get the Teams API base URL from environment variable
|
|
108
|
-
* Falls back to extracting from REACT_APP_TEAMS_API_URL if available
|
|
109
|
-
* @param appType Application type (reactJs or nextJs)
|
|
110
|
-
* @returns Teams API base URL
|
|
111
|
-
*/
|
|
112
|
-
export const getTeamsApiBaseUrl = (appType) => {
|
|
113
|
-
return getBaseUrl(appType) + FETCH_TEAMS_LIST;
|
|
114
|
-
};
|
|
115
105
|
export const getRelativeTime = (timestamp) => {
|
|
116
106
|
const now = new Date();
|
|
117
107
|
const created = new Date(timestamp);
|