umwd-components 0.1.30 → 0.1.31

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.
@@ -113,22 +113,21 @@ function Footer({
113
113
  xs: 12,
114
114
  sm: 4,
115
115
  align: "center"
116
- }, /*#__PURE__*/React.createElement(material.Typography, {
116
+ }, company_socials.length > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(material.Typography, {
117
117
  variant: "h6"
118
- }, "Socials"), company_socials && /*#__PURE__*/React.createElement(material.Stack, {
118
+ }, "Socials"), /*#__PURE__*/React.createElement(material.Stack, {
119
119
  spacing: 2,
120
120
  sx: {
121
121
  width: "min-content",
122
122
  color: "primary.contrastText"
123
123
  }
124
124
  }, company_socials.map((company_social, index) => {
125
- if (company_social.url === undefined || company_social.icon === undefined) {
126
- return /*#__PURE__*/React.createElement(material.IconButton, {
127
- color: "inherit",
128
- href: company_social.url
129
- }, company_social.icon);
130
- }
131
- }))), /*#__PURE__*/React.createElement(material.Grid, {
125
+ return /*#__PURE__*/React.createElement(material.IconButton, {
126
+ key: index,
127
+ color: "inherit",
128
+ href: company_social.url
129
+ }, company_social.icon);
130
+ })))), /*#__PURE__*/React.createElement(material.Grid, {
132
131
  item: true,
133
132
  xs: 12
134
133
  }, /*#__PURE__*/React.createElement(material.Divider, null)), disclaimer_link && /*#__PURE__*/React.createElement(material.Grid, {
@@ -157,7 +156,7 @@ function Footer({
157
156
  href: privacypolicy_link
158
157
  }, /*#__PURE__*/React.createElement(material.Typography, {
159
158
  variant: "body1"
160
- }, "Privacy Policy"))), /*#__PURE__*/React.createElement(material.Grid, {
159
+ }, "Privacy Policy"))), Boolean(disclaimer_link || privacypolicy_link) && /*#__PURE__*/React.createElement(material.Grid, {
161
160
  item: true,
162
161
  xs: 12
163
162
  }, /*#__PURE__*/React.createElement(material.Divider, null)), /*#__PURE__*/React.createElement(material.Grid, {
@@ -109,22 +109,21 @@ function Footer({
109
109
  xs: 12,
110
110
  sm: 4,
111
111
  align: "center"
112
- }, /*#__PURE__*/React.createElement(Typography, {
112
+ }, company_socials.length > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Typography, {
113
113
  variant: "h6"
114
- }, "Socials"), company_socials && /*#__PURE__*/React.createElement(Stack, {
114
+ }, "Socials"), /*#__PURE__*/React.createElement(Stack, {
115
115
  spacing: 2,
116
116
  sx: {
117
117
  width: "min-content",
118
118
  color: "primary.contrastText"
119
119
  }
120
120
  }, company_socials.map((company_social, index) => {
121
- if (company_social.url === undefined || company_social.icon === undefined) {
122
- return /*#__PURE__*/React.createElement(IconButton, {
123
- color: "inherit",
124
- href: company_social.url
125
- }, company_social.icon);
126
- }
127
- }))), /*#__PURE__*/React.createElement(Grid, {
121
+ return /*#__PURE__*/React.createElement(IconButton, {
122
+ key: index,
123
+ color: "inherit",
124
+ href: company_social.url
125
+ }, company_social.icon);
126
+ })))), /*#__PURE__*/React.createElement(Grid, {
128
127
  item: true,
129
128
  xs: 12
130
129
  }, /*#__PURE__*/React.createElement(Divider, null)), disclaimer_link && /*#__PURE__*/React.createElement(Grid, {
@@ -153,7 +152,7 @@ function Footer({
153
152
  href: privacypolicy_link
154
153
  }, /*#__PURE__*/React.createElement(Typography, {
155
154
  variant: "body1"
156
- }, "Privacy Policy"))), /*#__PURE__*/React.createElement(Grid, {
155
+ }, "Privacy Policy"))), Boolean(disclaimer_link || privacypolicy_link) && /*#__PURE__*/React.createElement(Grid, {
157
156
  item: true,
158
157
  xs: 12
159
158
  }, /*#__PURE__*/React.createElement(Divider, null)), /*#__PURE__*/React.createElement(Grid, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -110,25 +110,26 @@ function Footer({
110
110
  <Typography variant="body1"></Typography>
111
111
  </Grid>
112
112
  <Grid item xs={12} sm={4} align="center">
113
- <Typography variant="h6">Socials</Typography>
114
- {company_socials && (
115
- <Stack
116
- spacing={2}
117
- sx={{ width: "min-content", color: "primary.contrastText" }}
118
- >
119
- {company_socials.map((company_social, index) => {
120
- if (
121
- company_social.url === undefined ||
122
- company_social.icon === undefined
123
- ) {
113
+ {company_socials.length > 0 && (
114
+ <>
115
+ <Typography variant="h6">Socials</Typography>
116
+ <Stack
117
+ spacing={2}
118
+ sx={{ width: "min-content", color: "primary.contrastText" }}
119
+ >
120
+ {company_socials.map((company_social, index) => {
124
121
  return (
125
- <IconButton color="inherit" href={company_social.url}>
122
+ <IconButton
123
+ key={index}
124
+ color="inherit"
125
+ href={company_social.url}
126
+ >
126
127
  {company_social.icon}
127
128
  </IconButton>
128
129
  );
129
- }
130
- })}
131
- </Stack>
130
+ })}
131
+ </Stack>
132
+ </>
132
133
  )}
133
134
  </Grid>
134
135
  <Grid item xs={12}>
@@ -180,9 +181,11 @@ function Footer({
180
181
  >
181
182
  <CookieConsentButton />
182
183
  </Grid> */}
183
- <Grid item xs={12}>
184
- <Divider />
185
- </Grid>
184
+ {Boolean(disclaimer_link || privacypolicy_link) && (
185
+ <Grid item xs={12}>
186
+ <Divider />
187
+ </Grid>
188
+ )}
186
189
  <Grid
187
190
  item
188
191
  xs={12}