@flozy/editor 10.2.7 → 10.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,12 +71,25 @@ const ThemeSettings = props => {
71
71
  template_tag
72
72
  });
73
73
  const currentSelectedTheme = result?.data?.find(d => d.id === id);
74
- const currThemeName = currentSelectedTheme?.name;
74
+ let themesList = result?.data || [];
75
75
  if (currentSelectedTheme) {
76
+ const currThemeName = currentSelectedTheme?.name;
77
+ const currThemeTag = currentSelectedTheme?.template_tag;
78
+ const isHavingName = currThemeName && currThemeName !== name;
79
+ const isHavingTag = !template_tag && currThemeTag;
80
+ let update = {};
81
+ if (isHavingTag) {
82
+ update.template_tag = currThemeTag;
83
+ themesList = themesList.filter(t => t.template_tag === currThemeTag);
84
+ }
85
+ if (isHavingName) {
86
+ update.name = currThemeName;
87
+ }
88
+
76
89
  // for theme templates created by design team
77
- updateTheme(currentSelectedTheme);
90
+ updateTheme(update);
78
91
  }
79
- setThemes(result?.data || []);
92
+ setThemes(themesList);
80
93
  } catch (err) {
81
94
  console.log(err);
82
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "10.2.7",
3
+ "version": "10.2.8",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"