@fluid-app/portal-sdk 0.1.88 → 0.1.89

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.
@@ -33,7 +33,6 @@ import "./SpacerWidget-CX7bjjNF.mjs";
33
33
  import "./TableWidget-Nkzz38xS.mjs";
34
34
  import "./ToDoWidget-D52-GT7f.mjs";
35
35
  import "./VideoWidget-4DRASBWA.mjs";
36
- import "./use-fluid-api-CyK8Yoj-.mjs";
37
36
  import "./dist-CkIGP8my.mjs";
38
37
  import "./es-Dlib2eNY.mjs";
39
38
  export { MessagingScreen, messagingScreenPropertySchema };
@@ -32,11 +32,7 @@ import "./SpacerWidget-CX7bjjNF.mjs";
32
32
  import "./TableWidget-Nkzz38xS.mjs";
33
33
  import "./ToDoWidget-D52-GT7f.mjs";
34
34
  import "./VideoWidget-4DRASBWA.mjs";
35
- import "./use-account-clients-Bg1xqjMk.mjs";
36
35
  import "./ScreenHeaderContext-NdrJ58Mg.mjs";
37
- import "./use-fluid-api-CyK8Yoj-.mjs";
38
- import "./use-current-user-DqLNoj-3.mjs";
39
- import "./AppNavigationContext-BSnbFILQ.mjs";
40
36
  import "./dist-CkIGP8my.mjs";
41
37
  import "./es-Dlib2eNY.mjs";
42
38
  import "./dist-C9vpl_rR.mjs";
@@ -1,6 +1,6 @@
1
1
  require("./chunk-9hOWP6kD.cjs");
2
2
  require("./FluidProvider-Cwh9D2D_.cjs");
3
- const require_ProfileScreen = require("./ProfileScreen-CUBNMPCL.cjs");
3
+ const require_ProfileScreen = require("./ProfileScreen-ueK01fjb.cjs");
4
4
  require("./PointsWidget-Bgl95R-6.cjs");
5
5
  require("./error-state-BDBF2JrB.cjs");
6
6
  require("./ScreenRenderer-D65AsKjr.cjs");
@@ -2499,11 +2499,16 @@ function ProfileContentScreen({ onToast, countryIso }) {
2499
2499
  queryFn: () => sdkClient.get("/countries"),
2500
2500
  initialData: []
2501
2501
  });
2502
+ const { data: companySettings, isLoading: isLoadingCompanySettings } = useQuery({
2503
+ queryKey: ["sdk-company-settings"],
2504
+ queryFn: () => sdkClient.get("/settings/checkout")
2505
+ });
2506
+ const rewardPointsEnabled = companySettings?.reward_points_enabled ?? false;
2502
2507
  const customerId = accountData?.customer?.id;
2503
2508
  const { data: pointsLedgerData, isLoading: isLoadingPointsLedger } = useQuery({
2504
2509
  queryKey: ["customer-points-ledger", customerId],
2505
2510
  queryFn: () => sdkClient.get(`${API_VERSION}/customers/${customerId}/points_ledgers`),
2506
- enabled: !!customerId
2511
+ enabled: !!customerId && rewardPointsEnabled
2507
2512
  });
2508
2513
  const updateCustomerMutation = useMutation({
2509
2514
  mutationFn: (data) => {
@@ -2612,7 +2617,7 @@ function ProfileContentScreen({ onToast, countryIso }) {
2612
2617
  children: "Unable to load account data. Please try again later."
2613
2618
  })
2614
2619
  });
2615
- if (isLoadingAccount || !accountData) return /* @__PURE__ */ jsx("div", {
2620
+ if (isLoadingAccount || isLoadingCompanySettings || !accountData) return /* @__PURE__ */ jsx("div", {
2616
2621
  className: "px-4 pt-4 sm:px-9 md:pt-8",
2617
2622
  children: /* @__PURE__ */ jsxs("div", {
2618
2623
  className: "space-y-4",
@@ -2634,7 +2639,7 @@ function ProfileContentScreen({ onToast, countryIso }) {
2634
2639
  await updateCustomerMutation.mutateAsync(data);
2635
2640
  },
2636
2641
  isUpdatingCustomer: updateCustomerMutation.isPending,
2637
- rewardsPointsEnabled: adaptedPointsLedger.length > 0,
2642
+ rewardsPointsEnabled: rewardPointsEnabled,
2638
2643
  pointsLedger: adaptedPointsLedger,
2639
2644
  isLoadingPointsLedger,
2640
2645
  addresses,
@@ -2757,4 +2762,4 @@ const profileScreenPropertySchema = {
2757
2762
  //#endregion
2758
2763
  export { ProfileScreen_exports as n, profileScreenPropertySchema as r, ProfileScreen as t };
2759
2764
 
2760
- //# sourceMappingURL=ProfileScreen-COoE756I.mjs.map
2765
+ //# sourceMappingURL=ProfileScreen-DKJrpeMw.mjs.map