@bluemarble/bm-components 1.10.2 → 1.10.4

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/dist/index.mjs CHANGED
@@ -3413,14 +3413,14 @@ function FormikAutocompleteLegacy(_a) {
3413
3413
  const [_a2, ..._b2] = useField2({
3414
3414
  name: props.name
3415
3415
  }), _c = _a2, { value } = _c, field = __objRest(_c, ["value"]), [meta, { setValue }] = _b2;
3416
- const defaultOption = useMemo2(() => {
3416
+ const [defaultOption] = useState3(() => {
3417
3417
  const key = option == null ? void 0 : option.key;
3418
3418
  if (key)
3419
3419
  return props.options.find((option2) => option2[key] === value);
3420
3420
  return props.options.find(
3421
3421
  (option2) => Object.values(option2)[0] === value
3422
3422
  );
3423
- }, [value, option, props.options.find]);
3423
+ });
3424
3424
  const onChange = (_, newValue) => {
3425
3425
  const value2 = option == null ? void 0 : option.value;
3426
3426
  if (getOptionValue) {
@@ -3463,7 +3463,7 @@ function FormikAutocompleteLegacy(_a) {
3463
3463
  autoFocus: props.autoFocus
3464
3464
  }), props.textFieldProps)
3465
3465
  ),
3466
- value: defaultOption || null,
3466
+ defaultValue: defaultOption || null,
3467
3467
  onChange,
3468
3468
  isOptionEqualToValue
3469
3469
  }, props)
@@ -5134,6 +5134,7 @@ function CreateAuthProvider({
5134
5134
  const { createAlert } = useAlert();
5135
5135
  const signIn = useCallback7(
5136
5136
  (_0) => __async(this, [_0], function* ({ email, password }) {
5137
+ var _a, _b;
5137
5138
  setStatus("loading");
5138
5139
  try {
5139
5140
  const response = yield api.post("/auth/login", {
@@ -5147,7 +5148,7 @@ function CreateAuthProvider({
5147
5148
  setStatus("autenticated");
5148
5149
  return true;
5149
5150
  } catch (error) {
5150
- createAlert(error.response.data.error, "error");
5151
+ createAlert((_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.error, "error");
5151
5152
  setStatus("unauthenticated");
5152
5153
  throw error;
5153
5154
  }