@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.
@@ -1161,7 +1161,8 @@ function parseNavItems(html) {
1161
1161
  }
1162
1162
  function CMSHeader({ nav }) {
1163
1163
  if (!nav) return null;
1164
- const primary = nav.sections?.primary ?? nav.content?.primary ?? nav.primary ?? {};
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,10 +1204,12 @@ function parseLegalLinks(html) {
1203
1204
  }
1204
1205
  function CMSFooter({ footer }) {
1205
1206
  if (!footer) return null;
1206
- const c = footer.sections?.content ?? footer.content?.content ?? footer.content ?? {};
1207
- const contact = footer.sections?.contact ?? footer.content?.contact ?? footer.contact ?? {};
1208
- const social = footer.sections?.social ?? footer.content?.social ?? footer.social ?? {};
1209
- const legal = footer.sections?.legal ?? footer.content?.legal ?? footer.legal ?? {};
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 ?? {};
1210
1213
  const columns = parseFooterColumns(c.columns || "");
1211
1214
  const legalLinks = parseLegalLinks(legal.legal_links || "");
1212
1215
  const hasSocial = social.facebook || social.twitter || social.instagram || social.linkedin || social.youtube;