umwd-components 0.1.736 → 0.1.737

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.
@@ -81,7 +81,7 @@ function Navbar({ data }) {
81
81
  flexGrow: 1,
82
82
  display: { xs: "none", md: "flex", alignItems: "center" },
83
83
  }, children: jsx(Tabs, { value: currentTab, "aria-label": "main website navigation", indicatorColor: "secondary", role: "navigation", children: navigation.length > 0 &&
84
- navigation.map((page) => {
84
+ navigation.map((page, index) => {
85
85
  return (jsx(Tab, { value: page.tab, label: jsxs(Fragment, { children: [jsx(StyledLink, { href: page.path, sx: { color: theme.palette.primary.contrastText }, target: "_self", children: page.title }), page.subItems &&
86
86
  page.subItems.length > 0 &&
87
87
  page.subItems.map((child, index) => {
@@ -102,7 +102,7 @@ function Navbar({ data }) {
102
102
  "&:hover": {
103
103
  borderBottom: "1px solid red",
104
104
  },
105
- }, children: child.title }) }) }) }, child.id));
105
+ }, children: child.title }) }) }, `${child.documentId}-inner`) }, child.documentId));
106
106
  })] }), sx: {
107
107
  color: theme.palette.primary.contrastText,
108
108
  opacity: 0.9,
@@ -116,7 +116,7 @@ function Navbar({ data }) {
116
116
  top: "0px",
117
117
  },
118
118
  },
119
- } }, page.id));
119
+ } }, page.documentId));
120
120
  }) }) }), jsx(StyledLink, { href: "/", sx: {
121
121
  color: theme.palette.primary.contrastText,
122
122
  textDecoration: "none",
@@ -161,8 +161,8 @@ function Navbar({ data }) {
161
161
  boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)",
162
162
  }, "aria-label": "close", children: jsx(CloseIcon, { sx: { color: "primary.contrastText" } }) })] }) }) }), jsxs(List, { children: [navigation.length > 0 && (jsx(Fragment, { children: navigation.map((page) => {
163
163
  return (jsxs(Fragment$1, { children: [jsx(StyledLink, { href: page.path, target: "_self", children: jsx(ListItem, { children: jsx(ListItemText, { primary: page.title }) }) }), jsx(Divider, {}), page.subItems && page.subItems.length > 0 && (jsx(List, { children: page.subItems.map((child) => {
164
- return (jsxs(Fragment$1, { children: [jsx(StyledLink, { href: child.path, target: "_self", children: jsx(ListItem, { children: jsx(ListItemText, { primary: child.title }) }) }), jsx(Divider, {})] }, child.id));
165
- }) }))] }, page.id));
164
+ return (jsxs(Fragment$1, { children: [jsx(StyledLink, { href: child.path, target: "_self", children: jsx(ListItem, { children: jsx(ListItemText, { primary: child.title }) }) }), jsx(Divider, {})] }, child.documentId));
165
+ }) }))] }, page.documentId));
166
166
  }) })), slot1 && (jsxs(Fragment, { children: [jsx(ListItem, { children: slot1 }), jsx(Divider, {})] })), slot2 && (jsxs(Fragment, { children: [jsx(ListItem, { children: slot2 }), jsx(Divider, {})] }))] })] })] })] }) }) }));
167
167
  }
168
168
 
@@ -61,7 +61,7 @@ const query = qs.stringify({
61
61
  const query = qs.stringify({
62
62
  populate: {
63
63
  customer_profile: {
64
- populate: "*",
64
+ populate: ["orders", "returns"],
65
65
  },
66
66
  },
67
67
  });
@@ -13,7 +13,7 @@ function parseStrapiNavigation(navigation) {
13
13
  // If the page has no parent, it's a root page
14
14
  if (page.parent == null) {
15
15
  let newNavItem = {
16
- id: page.slug,
16
+ documentId: page.documentId,
17
17
  tab: count,
18
18
  title: page.title,
19
19
  path: `${page.path}`,
@@ -28,13 +28,13 @@ function parseStrapiNavigation(navigation) {
28
28
  for (const childPage of Object.values(navigation.pages)) {
29
29
  if (childPage.parent !== null) {
30
30
  // Find the parent page in the pages array
31
- const parentPage = pages.find((page) => page.id === childPage.parent);
31
+ const parentPage = pages.find((page) => page.documentId === childPage.parent);
32
32
  if (parentPage) {
33
33
  if (!parentPage.subItems) {
34
34
  parentPage.subItems = [];
35
35
  }
36
36
  let newChildItem = {
37
- id: childPage.id.toString(),
37
+ documentId: childPage.documentId,
38
38
  tab: count,
39
39
  title: childPage.title,
40
40
  path: `${childPage.path}`,