Closed 4nshuman closed 3 weeks ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
github-readme-quotes | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Sep 8, 2024 1:48pm |
github-readme-quotes-returns | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Sep 8, 2024 1:48pm |
@4nshuman is attempting to deploy a commit to the shravan20's projects Team on Vercel.
A member of the Team first needs to authorize it.
The changes introduce a new feature for selecting quote types in the application, enhancing user interaction. A new state variable, quoteType
, is implemented in the Home
component, allowing users to choose between different quote types via an Autocomplete
component. This selection influences the rendering of the TemplateCard
and modifies the API to accommodate the new quote type parameter, improving the overall functionality of quote retrieval and display.
Files | Change Summary |
---|---|
frontend/src/components/Pages/Home/index.js |
Added a state variable quoteType to manage quote selection through an Autocomplete component, passing it to TemplateCard . |
frontend/src/components/organisms/TemplateCard/index.js |
Updated quoteUrl to include a new quoteType parameter for dynamic URL generation based on selected quote type. |
frontend/src/config/cardTemplate/index.js |
Introduced a new constant quoteTypes with options 'random' and 'quote-for-the-day' for dynamic content generation. |
src/api/controllers/quotesController.js |
Improved code formatting and organization in quoteController , maintaining existing logic and error handling. |
src/api/routes/quotes-router.js |
Added quoteType parameter to API documentation, specifying type, default value, and possible values for enhanced functionality. |
src/api/services/quotesService.js |
Enhanced getQuote function by adding quoteType parameter and introducing getQuoteIndex helper function for dynamic quote selection based on type requested. |
sequenceDiagram
participant User
participant Home
participant TemplateCard
participant QuotesService
User->>Home: Select quote type
Home->>TemplateCard: Pass selected quoteType
TemplateCard->>QuotesService: Request quote with quoteType
QuotesService-->>TemplateCard: Return selected quote
TemplateCard-->>Home: Render quote
π
In a field of dreams, I hop and play,
With quotes to share, brightening the day!
A type to choose, oh what a delight,
From random to wisdom, all feels just right!
So letβs celebrate, with joy and cheer,
For quotes now dance, bringing us near! πΌβ¨
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?
@shravan20, Please review the changes
This PR resolves Issue#236
Added UI element for cards:
Added API modifications for persisting a quote for a day:
Summary by CodeRabbit
New Features
Autocomplete
component for users to select different quote types.Bug Fixes
Documentation
quoteType
parameter and its usage.Refactor