Closed joelbrs closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
bank-web.com.br | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 20, 2024 7:49pm |
bank.com.br.server | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 20, 2024 7:49pm |
As mudanças na funcionalidade do DashboardLayout
melhoraram o gerenciamento do ciclo de vida do componente ao mover a chamada da função confirmLink()
para um hook useEffect
. Essa mudança garante que a função seja executada apenas após a montagem do componente, evitando efeitos colaterais indesejados. Além disso, a remoção do callback de navegação pós-mutation sugere uma nova abordagem na experiência do usuário após a conclusão de ações.
Arquivos | Resumo das Mudanças |
---|---|
apps/web/src/layouts/dashboard.tsx |
Mudança da chamada confirmLink() para useEffect , melhorando o controle do ciclo de vida. Remoção do callback onCompleted da função fetchMutation , alterando a navegação após a mutação. |
sequenceDiagram
participant User
participant DashboardLayout
participant confirmLink
User->>DashboardLayout: Renderiza o componente
DashboardLayout->>confirmLink: Chama confirmLink() (anteriormente)
confirmLink-->>DashboardLayout: Retorno (pode causar efeitos colaterais)
activate DashboardLayout
DashboardLayout->>confirmLink: useEffect: Chama confirmLink() (atualmente)
confirmLink-->>DashboardLayout: Retorno (sem efeitos colaterais)
deactivate DashboardLayout
🐇
No layout do painel, mudanças chegaram,
ComuseEffect
, os links já não erraram.
Navegar com cuidado, a nova missão,
Um código mais claro, é festa no coração!
🥳✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
Novos Recursos
Mudanças de Comportamento
/dashboard
após a conclusão de uma mutação foi removida, alterando a experiência do usuário.