diff --git a/src/json/text.json b/src/json/text.json index 392f4c9bf1..37da485f79 100644 --- a/src/json/text.json +++ b/src/json/text.json @@ -1637,6 +1637,8 @@ "notificationGallerySuccessTitle": "\"%s\" was installed", "notificationGallerySuccessText": "Experience was successfully installed to the \"%s\" space. You can now open and start using it.", "notificationGalleryErrorTitle": "Something went wrong", - "notificationGalleryErrorText": "Oops! \"%s\" wasn't installed. Please check your internet connection and try again or post a report on forum." + "notificationGalleryErrorText": "Oops! \"%s\" wasn't installed. Please check your internet connection and try again or post a report on forum.", + "notificationNotionErrorNoObjectsTitle": "Add integration to the Notion pages you want to import", + "notificationNotionErrorNoObjectsText": "Select Notion document → … -> Add Connections -> Confirm Integration" } diff --git a/src/ts/component/notification/import.tsx b/src/ts/component/notification/import.tsx index beea509e80..a95e823d57 100644 --- a/src/ts/component/notification/import.tsx +++ b/src/ts/component/notification/import.tsx @@ -9,11 +9,17 @@ const NotificationImport = observer(class NotificationImport extends React.Compo render () { const { item, onButton } = this.props; const { payload, type } = item; - const { errorCode, spaceId } = payload; + const { errorCode, spaceId, importType } = payload; const object = UtilObject.getSpaceviewBySpaceId(spaceId) || {}; const lang = errorCode ? 'error' : 'success'; - const title = translate(UtilCommon.toCamelCase(`notification-${type}-${lang}-title`)); - const text = translate(UtilCommon.toCamelCase(`notification-${type}-${lang}-text`)); + + let title = translate(UtilCommon.toCamelCase(`notification-${type}-${lang}-title`)); + let text = translate(UtilCommon.toCamelCase(`notification-${type}-${lang}-text`)); + + if (importType == 0 && errorCode == 5) { + title = translate('notificationNotionErrorNoObjectsTitle'); + text = translate('notificationNotionErrorNoObjectsText'); + }; let buttons = []; if (errorCode) { @@ -44,4 +50,4 @@ const NotificationImport = observer(class NotificationImport extends React.Compo }); -export default NotificationImport; \ No newline at end of file +export default NotificationImport;