@griddo/ax 11.15.1 → 11.15.2
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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/ax",
|
|
3
3
|
"description": "Griddo Author Experience",
|
|
4
|
-
"version": "11.15.
|
|
4
|
+
"version": "11.15.2",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Diego M. Béjar <diego.bejar@secuoyas.com>",
|
|
@@ -219,5 +219,5 @@
|
|
|
219
219
|
"publishConfig": {
|
|
220
220
|
"access": "public"
|
|
221
221
|
},
|
|
222
|
-
"gitHead": "
|
|
222
|
+
"gitHead": "1478187fd356070efb893e576238cf3645f97af4"
|
|
223
223
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IMenu, INavigation, IRootState, ISite } from "@ax/types";
|
|
1
|
+
import type { IMenu, INavigation, IRootState, ISite } from "@ax/types";
|
|
2
2
|
|
|
3
3
|
const getStateValues = (getState: () => IRootState) => {
|
|
4
4
|
const {
|
|
@@ -17,7 +17,7 @@ const getStateValues = (getState: () => IRootState) => {
|
|
|
17
17
|
menu: { savedMenus },
|
|
18
18
|
app: { isSaving, isLoading },
|
|
19
19
|
} = getState();
|
|
20
|
-
const section = editorContent
|
|
20
|
+
const section = editorContent?.[0];
|
|
21
21
|
const { modules } = !!section && section;
|
|
22
22
|
|
|
23
23
|
return {
|
|
@@ -132,24 +132,20 @@ const DefaultItem = (props: IProps): JSX.Element => {
|
|
|
132
132
|
navLanguages.find((navLang) => navLang.languageId === language.id);
|
|
133
133
|
|
|
134
134
|
const handleLanguage = async (language: ILanguage) => {
|
|
135
|
-
|
|
135
|
+
await setLanguage({ locale: language.locale, id: language.id });
|
|
136
136
|
|
|
137
|
-
const lang = {
|
|
138
|
-
locale,
|
|
139
|
-
id,
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
setLanguage(lang);
|
|
143
137
|
const isHeader = type === "header";
|
|
144
138
|
const setNav = (id: number) => (isHeader ? setHeader(id) : setFooter(id));
|
|
145
139
|
const selectedNavLanguage = getSelectedNavLanguage(navigationLanguages, language);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
!selectedNavLanguage
|
|
140
|
+
|
|
141
|
+
setNav(selectedNavLanguage?.navigationId ?? defaultContent.id!);
|
|
142
|
+
|
|
143
|
+
if (!selectedNavLanguage) {
|
|
144
|
+
createNewTranslation(true);
|
|
145
|
+
}
|
|
146
|
+
|
|
150
147
|
await getMenus();
|
|
151
|
-
|
|
152
|
-
setHistoryPush(path, true);
|
|
148
|
+
setHistoryPush("/sites/navigations/editor", true);
|
|
153
149
|
};
|
|
154
150
|
|
|
155
151
|
const availableLanguages = isAllowedToCreateFooters || isAllowedToCreateHeaders ? languages : currentLanguages;
|