@orderly.network/affiliate 2.8.10 → 2.8.11-alpha.0
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.
- package/dist/index.js +7 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -532,12 +532,10 @@ var AutoHideText = (props) => {
|
|
|
532
532
|
const [visibleChars, setVisibleChars] = react.useState(0);
|
|
533
533
|
react.useEffect(() => {
|
|
534
534
|
const calculateVisibleChars = () => {
|
|
535
|
-
if (props.visibleCount !== void 0)
|
|
536
|
-
return;
|
|
535
|
+
if (props.visibleCount !== void 0) return;
|
|
537
536
|
if (containerRef.current && textRef.current) {
|
|
538
537
|
const containerWidth = containerRef.current.clientWidth;
|
|
539
|
-
if (containerWidth == lastContainerWidth.current)
|
|
540
|
-
return;
|
|
538
|
+
if (containerWidth == lastContainerWidth.current) return;
|
|
541
539
|
lastContainerWidth.current = containerWidth;
|
|
542
540
|
const textElement = textRef.current;
|
|
543
541
|
const textContent = text;
|
|
@@ -845,8 +843,7 @@ var useReferralLinkScript = () => {
|
|
|
845
843
|
return firstCode?.code;
|
|
846
844
|
}, [firstCode]);
|
|
847
845
|
const referralLink = react.useMemo(() => {
|
|
848
|
-
if (!firstCode)
|
|
849
|
-
return "";
|
|
846
|
+
if (!firstCode) return "";
|
|
850
847
|
return generateReferralLink(referralLinkUrl, firstCode.code);
|
|
851
848
|
}, [firstCode]);
|
|
852
849
|
const earn = react.useMemo(() => {
|
|
@@ -3360,8 +3357,7 @@ var useSummaryScript2 = () => {
|
|
|
3360
3357
|
];
|
|
3361
3358
|
const { referralInfo, userVolume } = useReferralContext();
|
|
3362
3359
|
const rebates = react.useMemo(() => {
|
|
3363
|
-
if (!referralInfo)
|
|
3364
|
-
return 0;
|
|
3360
|
+
if (!referralInfo) return 0;
|
|
3365
3361
|
switch (period) {
|
|
3366
3362
|
case "All":
|
|
3367
3363
|
return referralInfo.referee_info.total_referee_rebate;
|
|
@@ -3374,8 +3370,7 @@ var useSummaryScript2 = () => {
|
|
|
3374
3370
|
}
|
|
3375
3371
|
}, [referralInfo, period]);
|
|
3376
3372
|
const vol = react.useMemo(() => {
|
|
3377
|
-
if (!userVolume)
|
|
3378
|
-
return void 0;
|
|
3373
|
+
if (!userVolume) return void 0;
|
|
3379
3374
|
switch (period) {
|
|
3380
3375
|
case "All":
|
|
3381
3376
|
return userVolume.all_volume;
|
|
@@ -3716,8 +3711,7 @@ var useRebatesScript = () => {
|
|
|
3716
3711
|
endDate: dateRange?.from
|
|
3717
3712
|
});
|
|
3718
3713
|
const dataSource = react.useMemo(() => {
|
|
3719
|
-
if (typeof distributionData === "undefined")
|
|
3720
|
-
return [];
|
|
3714
|
+
if (typeof distributionData === "undefined") return [];
|
|
3721
3715
|
return distributionData.map((item) => {
|
|
3722
3716
|
const createdTime = item.date;
|
|
3723
3717
|
const volume = dailyVolume?.filter((item2) => {
|
|
@@ -4076,5 +4070,5 @@ exports.ReferralContext = ReferralContext;
|
|
|
4076
4070
|
exports.ReferralProvider = ReferralProvider;
|
|
4077
4071
|
exports.TabTypes = TabTypes;
|
|
4078
4072
|
exports.useReferralContext = useReferralContext;
|
|
4079
|
-
//# sourceMappingURL=
|
|
4073
|
+
//# sourceMappingURL=index.js.map
|
|
4080
4074
|
//# sourceMappingURL=index.js.map
|