The variable `result` is updated with the value of `updated_result` after calling the `update_components_with_user_data` function. This change improves code readability and makes the intention clearer.
✨ feat(API/index.ts): add support for additional query parameters in getStoreComponents and searchComponent functions to enable filtering and sorting of results
🐛 fix(StorePage/index.tsx): handle null values and update searchData and totalRowsCount in StorePage component to prevent errors and ensure accurate data display
✨ feat(StorePage/index.tsx): add support for sorting by popularity and alphabetical order in handleOrderPage function in StorePage component
🔧 fix(service.py): add search, status, tags, and sort parameters to query_components function to enable filtering and sorting of components
✨ feat(service.py): add build_search_filter_conditions method to build filter conditions for search query in query_components function
🐛 fix(StorePage/index.tsx): fix comment syntax error to prevent code from being commented out
🐛 fix(StorePage/index.tsx): handle undefined response in getStoreComponents promise chain to prevent errors
The export functionality was removed from the ExtraSidebar component as it was not being used. The tooltip content for the button was also updated to "Import" to accurately reflect its purpose.
fix(ConfirmationModal): add top margin to the confirmation button in the ConfirmationModal component to improve spacing
fix(extraSidebarComponent): change the size prop value of the ShareFlowButton component to "small-h-full" for better visual alignment
fix(extraSidebarComponent): add cursor pointer and click event to the text indicating the sharing status in the ShareFlowButton component to toggle the sharePublic state
fix(extraSidebarComponent): reduce the gap between elements in the ConfirmationModal content for better visual alignment
fix(extraSidebarComponent): change the className of the ExportModal button to "extra-side-bar-buttons" and add an onClick event to trigger the uploadFlow function
fix(extraSidebarComponent): change the className of the ExportModal button to "extra-side-bar-buttons" and add an onClick event to trigger the uploadFlow function
fix(extraSidebarComponent): change the className of the Save button in the ExtraSidebar component to "extra-side-bar-buttons" and add an onClick event to trigger the saveFlow function
fix(StorePage): remove console.log statement in the StorePage component
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(applies.css): remove unnecessary padding-bottom from the .main-page-flows-display class
fix(StorePage/index.tsx): fix useEffect dependencies and add missing handleChangeTab function
fix(API/index.ts): rename getNumberOfComponents function to getCountComponents to improve semantics
🔧 chore(service.py): include 'last_tested_version' field in the list of fields to retrieve from the store API for better tracking of component versions
The logic for updating the `likes_count` and `liked_by_user` state variables in the `handleLike` function was incorrect. This commit fixes the logic to correctly update the state variables based on the previous values. Additionally, it adds error handling for the `postLikeComponent` API call and sets the `likes_count` and `liked_by_user` state variables to their previous values in case of an error.
🐛 fix(service.py): fix incorrect variable name in get_component_likes_count method
🐛 fix(service.py): convert likes count to integer to handle unexpected string values
🐛 fix(service.py): convert component_id to string before sending it in the request payload
The changes were made to fix a bug where the likes count and user like status were not being displayed correctly on the market card component in the StorePage. The previous code was using the wrong variable to set the likes count and user like status. The fix updates the code to use the correct response values from the API call to set the likes count and user like status.
✨ feat(schema.py): update UsersLikesResponse model to include likes_count and liked_by_user fields
✨ feat(service.py): add get_component_likes_count method to retrieve the number of likes for a component
fix(market-card.tsx): add handleLike function to handle liking a component and update the liked_by_user and likes_count states accordingly
fix(market-card.tsx): update the Heart icon to be filled and have a destructive color if the component is liked by the user
fix(market-card.tsx): update the number of likes to be the likes_count state
fix(StorePage/index.tsx): set setErrorApiKey to false to clear any previous API key error
feat(types/store/index.ts): add liked_by_user property to storeComponent type to indicate if the component is liked by the user
🐛 fix(service.py): remove unused user_data parameter in get_liked_by_user_components function
🐛 fix(utils.py): rename in_users_collection attribute to in_user_collection for consistency
✨ feat(store.py): add support for user_data_context context manager to fetch and set user data for requests made inside the context
✨ feat(store.py): add support for in_user_collection attribute in ListComponentResponse schema to indicate if a component is in the user's collection
🐛 fix(store.py): fix get_liked_by_user_components function to use user_data_var context variable instead of making the request multiple times
🐛 fix(store.py): fix get_components_in_users_collection function to use user_data_var context variable instead of making the request multiple times
✨ feat(store.py): add update_components_with_user_data function to update components with user data (liked_by_user and in_users_collection attributes)
🐛 fix(schema.py): remove default value for liked_by_user attribute in ListComponentResponse
The indentation issue in `store.py` was causing the code to execute the wrong logic. The unnecessary comments were removed to improve code readability.
In `schema.py`, the default value for the `liked_by_user` attribute in the `ListComponentResponse` class was removed to ensure that it is only set when needed.
🔧 fix(schema.py): add liked_by_user field to ListComponentResponse schema
🔧 fix(service.py): add get_liked_by_user_components method to StoreService to retrieve liked components by user