Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Newsletter section behaviour #706

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eduardoformiga
Copy link
Member

What's the purpose of this pull request?

applies changes from

@eduardoformiga eduardoformiga requested a review from a team as a code owner February 28, 2025 19:37
Copy link

vercel bot commented Feb 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starter ✅ Ready (Inspect) Visit Preview Feb 28, 2025 7:38pm

eduardoformiga added a commit to vtex/faststore that referenced this pull request Mar 6, 2025
## What's the purpose of this pull request?

Fix the Newsletter section behavior that happens sometimes:
- error when add valid email
- success when add invalid email

|Before|After|
|-|-|
|![Feb-28-2025
16-30-21](https://github.com/user-attachments/assets/47af0c6b-8779-4dee-87c7-4654e581124e)|![Feb-28-2025
16-30-30](https://github.com/user-attachments/assets/9e7aa81b-0aa2-496e-9af3-d4e8b2537605)|


## How it works?

This pull request includes several changes to improve error handling and
data processing in the `Newsletter` component and the `useLazyQuery`
hook. The most important changes include updating the `onSubmit`
function to handle errors properly and ensuring the `useLazyQuery` hook
returns the updated data.

## How to test it?

You can compare the behavior locally, using the current starter (with
errors), or the fixed version from the Starter preview.

### Starters Deploy Preview

PR
- vtex-sites/starter.store#706
- preview: https://starter-oph90fa76-vtex.vercel.app/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant