odaptos_design_system 1.4.113 → 1.4.115

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.4.113",
2
+ "version": "1.4.115",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -165,7 +165,9 @@ export const Chat = ({
165
165
  </p>
166
166
  </div>
167
167
  <Text
168
- text={message.createdAt.toLocaleTimeString()}
168
+ text={new Date(
169
+ message.createdAt
170
+ ).toLocaleTimeString()}
169
171
  size="xs"
170
172
  color="grey"
171
173
  className={styles.user_text_message_username}
@@ -198,7 +200,9 @@ export const Chat = ({
198
200
  </p>
199
201
  </div>
200
202
  <Text
201
- text={message.createdAt.toLocaleTimeString()}
203
+ text={new Date(
204
+ message.createdAt
205
+ ).toLocaleTimeString()}
202
206
  size="xs"
203
207
  color="grey"
204
208
  className={styles.user_text_message_username}
@@ -217,7 +221,7 @@ export const Chat = ({
217
221
  </div>
218
222
  </div>
219
223
  );
220
- else
224
+ else if (message.from && message.createdAt && message.body)
221
225
  return (
222
226
  <div className={styles.message_container_chatbot}>
223
227
  <div className={styles.bot_indicator}>
@@ -238,14 +242,17 @@ export const Chat = ({
238
242
  </p>
239
243
  </div>
240
244
  <Text
241
- text={message.createdAt.toLocaleTimeString()}
245
+ text={new Date(
246
+ message.createdAt
247
+ ).toLocaleTimeString()}
242
248
  size="xs"
243
249
  color="grey"
244
250
  />
245
251
  </div>
246
252
  </div>
247
253
  );
248
- } else return null;
254
+ else return <></>;
255
+ } else return <></>;
249
256
  })}
250
257
  </div>
251
258
  </div>