kaori 3 лет назад
Родитель
Сommit
95f5598c2f
1 измененных файлов с 0 добавлено и 23 удалено
  1. 0 23
      packages/app/src/client/services/AdminCustomizeContainer.js

+ 0 - 23
packages/app/src/client/services/AdminCustomizeContainer.js

@@ -111,11 +111,6 @@ export default class AdminCustomizeContainer extends Container {
    */
   switchThemeType(themeName) {
     this.setState({ currentTheme: themeName });
-
-    // preview if production
-    if (process.env.NODE_ENV !== 'development') {
-      this.previewTheme(themeName);
-    }
   }
 
   /**
@@ -236,24 +231,6 @@ export default class AdminCustomizeContainer extends Container {
     this.setState({ currentCustomizeScript: inpuValue });
   }
 
-  /**
-   * Preview theme
-   * @param {string} themeName
-   */
-  async previewTheme(themeName) {
-    try {
-      // get theme asset path
-      const response = await apiv3Get('/customize-setting/theme/asset-path', { themeName });
-      const { assetPath } = response.data;
-
-      const themeLink = document.getElementById('grw-theme-link');
-      themeLink.setAttribute('href', assetPath);
-    }
-    catch (err) {
-      toastError(err);
-    }
-  }
-
   /**
    * Preview hljs style
    * @param {string} styleId