@sprintup-cms/sdk 1.8.53 → 1.8.54
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/dist/next/index.cjs +8 -6
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js +8 -6
- package/dist/next/index.js.map +1 -1
- package/package.json +1 -1
package/dist/next/index.cjs
CHANGED
|
@@ -1161,7 +1161,8 @@ function parseNavItems(html) {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
function CMSHeader({ nav }) {
|
|
1163
1163
|
if (!nav) return null;
|
|
1164
|
-
const
|
|
1164
|
+
const structuredBlock = nav.blocks?.[0]?.type === "__structured__" ? nav.blocks[0].content : null;
|
|
1165
|
+
const primary = nav.sectionData?.primary ?? structuredBlock?.primary ?? {};
|
|
1165
1166
|
const navItems = parseNavItems(primary.nav_items || "");
|
|
1166
1167
|
const logoUrl = primary.logo_url || "";
|
|
1167
1168
|
const logoAlt = primary.logo_alt || "";
|
|
@@ -1203,11 +1204,12 @@ function parseLegalLinks(html) {
|
|
|
1203
1204
|
}
|
|
1204
1205
|
function CMSFooter({ footer }) {
|
|
1205
1206
|
if (!footer) return null;
|
|
1206
|
-
const
|
|
1207
|
-
const
|
|
1208
|
-
const
|
|
1209
|
-
const
|
|
1210
|
-
const
|
|
1207
|
+
const structuredBlock = footer.blocks?.[0]?.type === "__structured__" ? footer.blocks[0].content : null;
|
|
1208
|
+
const sd = footer.sectionData ?? structuredBlock ?? {};
|
|
1209
|
+
const c = sd.content ?? {};
|
|
1210
|
+
const contact = sd.contact ?? {};
|
|
1211
|
+
const social = sd.social ?? {};
|
|
1212
|
+
const legal = sd.legal ?? {};
|
|
1211
1213
|
const columns = parseFooterColumns(c.columns || "");
|
|
1212
1214
|
const legalLinks = parseLegalLinks(legal.legal_links || "");
|
|
1213
1215
|
const hasSocial = social.facebook || social.twitter || social.instagram || social.linkedin || social.youtube;
|