diff --git a/frontend/src/HomePage/HomePage.jsx b/frontend/src/HomePage/HomePage.jsx index 31aa2dfee0..d6b2edcebb 100644 --- a/frontend/src/HomePage/HomePage.jsx +++ b/frontend/src/HomePage/HomePage.jsx @@ -478,7 +478,7 @@ class HomePageComponent extends React.Component { let installedPluginsInfo = []; try { if (this.state.dependentPlugins.length) { - ({ installedPluginsInfo =[] } = await pluginsService.installDependentPlugins( + ({ installedPluginsInfo = [] } = await pluginsService.installDependentPlugins( this.state.dependentPlugins, true )); @@ -486,7 +486,8 @@ class HomePageComponent extends React.Component { if (importJSON.app[0].definition.appV2.type !== this.props.appType) { toast.error( - `${this.props.appType === 'module' ? 'App' : 'Module'} could not be imported in ${this.props.appType === 'module' ? 'modules' : 'apps' + `${this.props.appType === 'module' ? 'App' : 'Module'} could not be imported in ${ + this.props.appType === 'module' ? 'modules' : 'apps' } section. Switch to ${this.props.appType === 'module' ? 'apps' : 'modules'} section and try again.`, { style: { maxWidth: '425px' } } ); @@ -495,7 +496,7 @@ class HomePageComponent extends React.Component { } const data = await appsService.importResource(requestBody, this.props.appType); - toast.success(`${this.props.appType === 'module' ? 'Module' : 'App'} imported successfully.`); + toast.success(`${this.getAppType()} imported successfully.`); this.setState({ isImportingApp: false }); if (!isEmpty(data.imports.app)) { @@ -1154,13 +1155,14 @@ class HomePageComponent extends React.Component { closeModal: () => this.setState({ showImportAppModal: false }), processApp: this.importFile, show: this.openImportAppModal, - title: 'Import app', - actionButton: 'Import app', + title: `Import ${this.getAppType().toLocaleLowerCase()}`, + actionButton: `Import ${this.getAppType().toLocaleLowerCase()}`, actionLoadingButton: 'Importing', fileContent: fileContent, selectedAppName: fileName, dependentPluginsDetail: dependentPluginsDetail, dependentPlugins: dependentPlugins, + appType: this.props.appType, }, template: { modalType: 'template', @@ -1224,8 +1226,9 @@ class HomePageComponent extends React.Component {