Closed Gupta-Anubhav12 closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
bhagavad-gita | ✅ Ready (Inspect) | Visit Preview | Sep 3, 2023 3:10pm |
CodeRabbit
This pull request introduces a more accessible and transition-friendly UI modal component using the @headlessui/react
library. It also refines the newsletter subscription logic by storing mutation results in a variable, enhancing readability and maintainability.
File(s) | Summary |
---|---|
gqty.config.cjs | Removed an unnecessary line of code that throws an error if the NEXT_PUBLIC_GRAPHQL_ENDPOINT environment variable is not defined. |
src/components/Home/Modal.tsx | Replaced the previous implementation with a new one that uses the @headlessui/react library for improved accessibility and transitions. Refactored to use the Transition and Dialog components from @headlessui/react . Modified some class names and styles. |
src/lib/subscribeUser.ts | Introduced a change to the subscribeUser function by adding a variable result to store the result of the mutation. The function now returns the id property of the result object. |
🐇💻
Code refined, errors declined,
With each line, we've designed,
A better flow, a smoother ride,
In our codebase, far and wide.
Accessibility, a noble quest,
Transitions smooth, we've done our best,
Newsletter logic, now so clear,
Celebrate changes, give a cheer! 🎉
Uplevel your code reviews with CodeRabbit Pro
### CodeRabbit Pro If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.
Summary by CodeRabbit
gqty
by removing an unnecessary error throw related to theNEXT_PUBLIC_GRAPHQL_ENDPOINT
environment variable.@headlessui/react
library.id
property of the mutation result, providing more detailed feedback on the subscription process.