@thefittingroom/shop-ui 0.0.6 → 0.0.8

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/README.md CHANGED
@@ -26,7 +26,7 @@ const shopId: number = 9001
26
26
  const hooks: TfrHooks = {
27
27
  onLoading: () => {},
28
28
  onLoadingComplete: () => {},
29
- onAvatarReady: (frames: string[]) => {},
29
+ onVtoReady: (frames: string[]) => {},
30
30
  onError: () => {},
31
31
  onLogin: () => {},
32
32
  onLogout: () => {},
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * thefittingroom v0.0.6 (2023-07-19T17:35:52.930Z)
2
+ * thefittingroom v0.0.8 (2023-07-26T17:22:58.790Z)
3
3
  * Copyright 2022-present, TheFittingRoom, Inc. All rights reserved.
4
4
  */
5
5
  /*!
@@ -36231,7 +36231,12 @@ class FittingRoom {
36231
36231
  return validationError(L.EmailError);
36232
36232
  if (!validatePassword(password))
36233
36233
  return validationError(L.PasswordError);
36234
- await this.tfrShop.user.login(username, password);
36234
+ try {
36235
+ await this.tfrShop.user.login(username, password);
36236
+ }
36237
+ catch (e) {
36238
+ return validationError(L.UsernameOrPasswordIncorrect);
36239
+ }
36235
36240
  if (this.hooks.onLogin)
36236
36241
  this.hooks.onLogin();
36237
36242
  this.nav.close();
@@ -36281,8 +36286,8 @@ class FittingRoom {
36281
36286
  this.hooks.onLoading();
36282
36287
  const frames = await this.tfrShop.tryOn(this.sku);
36283
36288
  this.nav.close();
36284
- if (this.hooks.onAvatarReady)
36285
- this.hooks.onAvatarReady(frames);
36289
+ if (this.hooks.onVtoReady)
36290
+ this.hooks.onVtoReady(frames);
36286
36291
  }
36287
36292
  catch (error) {
36288
36293
  if (error instanceof errors.AvatarNotCreatedError)