|
@@ -210,18 +210,17 @@ export default class AdminCustomizeContainer extends Container {
|
|
|
* @param {string} themeName
|
|
* @param {string} themeName
|
|
|
*/
|
|
*/
|
|
|
async previewTheme(themeName) {
|
|
async previewTheme(themeName) {
|
|
|
- let assetPath;
|
|
|
|
|
try {
|
|
try {
|
|
|
// get theme asset path
|
|
// get theme asset path
|
|
|
const response = await this.appContainer.apiv3.get('/customize-setting/layout-theme/asset-path', { themeName });
|
|
const response = await this.appContainer.apiv3.get('/customize-setting/layout-theme/asset-path', { themeName });
|
|
|
- assetPath = response.data.assetPath;
|
|
|
|
|
|
|
+ const { assetPath } = response.data;
|
|
|
|
|
+
|
|
|
|
|
+ const themeLink = document.getElementById('grw-theme-link');
|
|
|
|
|
+ themeLink.setAttribute('href', assetPath);
|
|
|
}
|
|
}
|
|
|
catch (err) {
|
|
catch (err) {
|
|
|
toastError(err);
|
|
toastError(err);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- const themeLink = document.getElementById('grw-theme-link');
|
|
|
|
|
- themeLink.setAttribute('href', assetPath);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|