await Effect.promise(() =>
mutation.mutateAsync({
// my params from my form
}),
).pipe(
Effect.andThen((x) => x), // because my promise mutation.mutate returns an Either,
Effect.andThen(Effect.tapError(Console.error)), // I used this, but it was Effect.tapError(Console.error) (without Effect.andThen)
Effect.andThen(afterSubmit),
Effect.runPromise,
);
await Effect.promise(() =>
mutation.mutateAsync({
// my params from my form
}),
).pipe(
Effect.andThen((x) => x), // because my promise mutation.mutate returns an Either,
Effect.andThen(Effect.tapError(Console.error)), // I used this, but it was Effect.tapError(Console.error) (without Effect.andThen)
Effect.andThen(afterSubmit),
Effect.runPromise,
);