@fluid-app/portal-sdk 0.1.201 → 0.1.203

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.
@@ -975,7 +975,7 @@ function PortalFavoritesEditor({ onBack, onRefreshPreview, onToast }) {
975
975
  }
976
976
  //#endregion
977
977
  //#region ../../mysite/ui/src/portal/components/MySiteProfileForm.tsx
978
- function MySiteProfileForm({ onBack, onToast, onUploadPhoto, avatarUrl, userName, userInitial }) {
978
+ function MySiteProfileForm({ onBack, onToast, onRefreshPreview, onUploadPhoto, avatarUrl, userName, userInitial }) {
979
979
  const { data: profile, isLoading: isProfileLoading } = require_use_mysite_portal.usePortalMySiteProfile();
980
980
  const updateProfileMutation = require_use_mysite_portal.usePortalUpdateProfile();
981
981
  const [formState, setFormState] = (0, react.useState)(() => ({
@@ -1007,6 +1007,7 @@ function MySiteProfileForm({ onBack, onToast, onUploadPhoto, avatarUrl, userName
1007
1007
  onSuccess: () => {
1008
1008
  profileSyncedRef.current = false;
1009
1009
  onToast?.("Profile updated successfully", "success");
1010
+ onRefreshPreview?.();
1010
1011
  },
1011
1012
  onError: () => {
1012
1013
  onToast?.("Failed to update profile", "error");
@@ -1015,7 +1016,8 @@ function MySiteProfileForm({ onBack, onToast, onUploadPhoto, avatarUrl, userName
1015
1016
  }, [
1016
1017
  formState,
1017
1018
  updateProfileMutation,
1018
- onToast
1019
+ onToast,
1020
+ onRefreshPreview
1019
1021
  ]);
1020
1022
  const fileInputRef = (0, react.useRef)(null);
1021
1023
  const [isUploadingPhoto, setIsUploadingPhoto] = (0, react.useState)(false);
@@ -1039,6 +1041,7 @@ function MySiteProfileForm({ onBack, onToast, onUploadPhoto, avatarUrl, userName
1039
1041
  updateProfileMutation.mutate({ avatar_url: imageUrl }, {
1040
1042
  onSuccess: () => {
1041
1043
  onToast?.("Profile photo updated", "success");
1044
+ onRefreshPreview?.();
1042
1045
  },
1043
1046
  onError: () => {
1044
1047
  setPreviewUrl(null);
@@ -1055,7 +1058,8 @@ function MySiteProfileForm({ onBack, onToast, onUploadPhoto, avatarUrl, userName
1055
1058
  }, [
1056
1059
  onUploadPhoto,
1057
1060
  updateProfileMutation,
1058
- onToast
1061
+ onToast,
1062
+ onRefreshPreview
1059
1063
  ]);
1060
1064
  if (isProfileLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1061
1065
  className: "flex h-full items-center justify-center",
@@ -1288,6 +1292,7 @@ function MySiteMainView({ editingSection, animPhase, showEditContent, onEditSect
1288
1292
  onToast: defaultToast
1289
1293
  }) : showEditContent && editingSection === "profile" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MySiteProfileForm, {
1290
1294
  onBack: onBackClick,
1295
+ onRefreshPreview: refreshPreview,
1291
1296
  onToast: defaultToast
1292
1297
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
1293
1298
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -1459,4 +1464,4 @@ Object.defineProperty(exports, "mySiteScreenPropertySchema", {
1459
1464
  }
1460
1465
  });
1461
1466
 
1462
- //# sourceMappingURL=MySiteScreen-yiG3VMjV.cjs.map
1467
+ //# sourceMappingURL=MySiteScreen-DDSiPpo4.cjs.map