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

feat: sku matrix packages api #2504

Open
wants to merge 3 commits into
base: feat/sku-matrix-cubos
Choose a base branch
from

Conversation

ramondorosario-ct
Copy link
Collaborator

@ramondorosario-ct ramondorosario-ct commented Oct 15, 2024

Este PR conta com a construção da nova query, que será utilizada pelo SKUMatrix e por toda a geração dos novos tipos.

Criamos um hook chamado useAllVariantProducts, responsável por fazer a request e devolver os dados formatados, conforme esperado pelo SKUMatrixSidebar. Para consumir esse hook, é necessário passar algumas propriedades, das quais podemos destacar o callBack e enabled.

  • callBack: é uma função que será executada apenas quando a requisição tiver sucesso e retornar todos os dados. Esse método irá retornar os dados totalmente formatados seguindo o formato pré-estabelecido no componente SKUMatrixSidebar

  • enabled: é um booleano (verdadeiro/falso). Ele irá informar para query se o SKUMatrixSidebar está aberto ou não. A requisição só será feita se o slider estiver aberto, caso contrário não, evitando requisição desnecessária

@ramondorosario-ct ramondorosario-ct requested a review from a team as a code owner October 15, 2024 19:29
@ramondorosario-ct ramondorosario-ct requested review from eduardoformiga and pedromtec and removed request for a team October 15, 2024 19:29
Copy link

vercel bot commented Oct 15, 2024

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

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 8:14pm

@ramondorosario-ct ramondorosario-ct added enhancement New feature or request depends on Depends on another PR - Please mention the PR and removed depends on Depends on another PR - Please mention the PR labels Oct 15, 2024
@renatomaurovtex renatomaurovtex added the contributing Pull request submitted by the community label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributing Pull request submitted by the community enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants