@sprintup-cms/sdk 1.8.51 → 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 -5
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js +8 -5
- package/dist/next/index.js.map +1 -1
- package/package.json +1 -1
package/dist/next/index.js
CHANGED
|
@@ -1155,7 +1155,8 @@ function parseNavItems(html) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
function CMSHeader({ nav }) {
|
|
1157
1157
|
if (!nav) return null;
|
|
1158
|
-
const
|
|
1158
|
+
const structuredBlock = nav.blocks?.[0]?.type === "__structured__" ? nav.blocks[0].content : null;
|
|
1159
|
+
const primary = nav.sectionData?.primary ?? structuredBlock?.primary ?? {};
|
|
1159
1160
|
const navItems = parseNavItems(primary.nav_items || "");
|
|
1160
1161
|
const logoUrl = primary.logo_url || "";
|
|
1161
1162
|
const logoAlt = primary.logo_alt || "";
|
|
@@ -1197,10 +1198,12 @@ function parseLegalLinks(html) {
|
|
|
1197
1198
|
}
|
|
1198
1199
|
function CMSFooter({ footer }) {
|
|
1199
1200
|
if (!footer) return null;
|
|
1200
|
-
const
|
|
1201
|
-
const
|
|
1202
|
-
const
|
|
1203
|
-
const
|
|
1201
|
+
const structuredBlock = footer.blocks?.[0]?.type === "__structured__" ? footer.blocks[0].content : null;
|
|
1202
|
+
const sd = footer.sectionData ?? structuredBlock ?? {};
|
|
1203
|
+
const c = sd.content ?? {};
|
|
1204
|
+
const contact = sd.contact ?? {};
|
|
1205
|
+
const social = sd.social ?? {};
|
|
1206
|
+
const legal = sd.legal ?? {};
|
|
1204
1207
|
const columns = parseFooterColumns(c.columns || "");
|
|
1205
1208
|
const legalLinks = parseLegalLinks(legal.legal_links || "");
|
|
1206
1209
|
const hasSocial = social.facebook || social.twitter || social.instagram || social.linkedin || social.youtube;
|