Skip to content

Commit d633227

Browse files
committed
fix(content-sharing): null sharingServiceProps
1 parent f0c9efd commit d633227

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"@box/metadata-view": "^0.59.0",
141141
"@box/react-virtualized": "^9.22.3-rc-box.10",
142142
"@box/types": "^0.2.1",
143-
"@box/unified-share-modal": "^0.52.0",
143+
"@box/unified-share-modal": "^1.5.1",
144144
"@box/user-selector": "^1.23.25",
145145
"@cfaester/enzyme-adapter-react-18": "^0.8.0",
146146
"@chromatic-com/storybook": "^4.0.1",
@@ -310,7 +310,7 @@
310310
"@box/metadata-view": "^0.59.0",
311311
"@box/react-virtualized": "^9.22.3-rc-box.10",
312312
"@box/types": "^0.2.1",
313-
"@box/unified-share-modal": "^0.52.0",
313+
"@box/unified-share-modal": "^1.5.1",
314314
"@box/user-selector": "^1.23.25",
315315
"@hapi/address": "^2.1.4",
316316
"@tanstack/react-virtual": "^3.13.12",

scripts/buildLocaleAssets.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ if (isMainThread) {
5555
const { locale, react } = workerData;
5656
parentPort.postMessage(`[${threadId}] Building ${locale} assets with react=${react}...`);
5757

58+
if (locale !== 'en-US') {
59+
return;
60+
}
5861
try {
5962
execSync(`time LANGUAGE=${locale} REACT=${react} yarn build:prod:dist`);
6063
} catch (error) {

src/elements/content-sharing/hooks/useSharingService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ export const useSharingService = ({
5050
id: itemId,
5151
access: sharedLink.access,
5252
permissions: {
53-
can_set_share_access: sharingServiceProps.can_set_share_access,
54-
can_share: sharingServiceProps.can_share,
53+
can_set_share_access: sharingServiceProps?.can_set_share_access,
54+
can_share: sharingServiceProps?.can_share,
5555
},
56-
serverUrl: sharingServiceProps.serverUrl,
56+
serverUrl: sharingServiceProps?.serverUrl,
5757
isDownloadAvailable: sharedLink.settings?.isDownloadAvailable ?? false,
5858
};
5959

src/elements/content-sharing/stories/ContentSharing.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const withCustomButton = {
1515

1616
export const withContentSharingV2Enabled = {
1717
args: {
18-
children: <button>Open Unified Share Modal</button>,
18+
// children: <button>Open Unified Share Modal</button>,
1919
features: {
2020
...global.FEATURE_FLAGS,
2121
contentSharingV2: true,

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,10 +1549,10 @@
15491549
resolved "https://registry.yarnpkg.com/@box/types/-/types-0.2.1.tgz#cd0a3915b2306e4cf581f6091b95f5d2db75ea60"
15501550
integrity sha512-wd6nRR9QxBl7lYKJ/Hix0AKg1PNC3leZWOJ9Nt+d4j45WxCYBiCemZAtY2ekL5BITpVw8vlLmquzSpPhDTeO5A==
15511551

1552-
"@box/unified-share-modal@^0.52.0":
1553-
version "0.52.0"
1554-
resolved "https://registry.yarnpkg.com/@box/unified-share-modal/-/unified-share-modal-0.52.0.tgz#5ebfb1c9246789ce4650efc9b19283de0c492f71"
1555-
integrity sha512-85/xr47n9uCNwJ3nMq5AEGHJ6DOUrClh9ARbwaoJeR39x0sTjv0JGIBAmK4yM2rhPMGZO2jnnBcZ8wbZ+yVoHw==
1552+
"@box/unified-share-modal@^1.5.1":
1553+
version "1.5.1"
1554+
resolved "https://registry.yarnpkg.com/@box/unified-share-modal/-/unified-share-modal-1.5.1.tgz#48d5b4acc57f9987acc1d897d801248110787719"
1555+
integrity sha512-zNSxgJOSZBNH2YF1pi3SJ3+y3br3JxM5A1XGoY6KJXi+b3QcLoWwS8ZuCb6eKNvq1S9f7q7RxSpT4ENs+0BLzw==
15561556

15571557
"@box/user-selector@^1.23.25":
15581558
version "1.23.25"

0 commit comments

Comments
 (0)