As a user
I want to use a search function within the app
In order to quickly find relevant flavors, ingredients, or their pairings
Description
Acceptance criteria
The search bar is prominently displayed on the main page and other relevant pages within the app.
The user can input any search terms related to flavors, ingredients, or pairings into the search bar.
While typing, the user is presented with relevant autocomplete suggestions based on the entered search terms.
Upon pressing the Enter key or tapping the search button, the user is shown a list of relevant search results.
If the search bar is submitted empty, it should display a default "Search" message in the search bar.
If no results match the search query, it should display a message saying "No items found".
Tasks
Create a new feature branch search-function.
Add a "Search" button to all pages.
Create SearchComponent component.
Introduce a state to Holds the search results to be displayed in the UI.
Introduce a state to Stores the instance of Fuse.js used for searching.
Defines an object fuseOptions specifying configuration options for Fuse.js.
Defines the handleSearch function to respond to changes in the input field. It
performs a search using the Fuse instance and updates the results state with the
found results.
Create a handleSearchSubmit function to handle search submission.
Value proposition
As a user I want to use a search function within the app In order to quickly find relevant flavors, ingredients, or their pairings
Description
Acceptance criteria
Tasks