🐛 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
refactor(StorePage/index.tsx): rename filteredCategories state variable to filteredTags for better semantics
feat(StorePage/index.tsx): add functionality to filter components by tags and update search results accordingly
fix(market-card): refactor totalComponentsMetadata function to improve readability
fix(StorePage): remove unused import and add logic to handle pagination rendering based on search and loading status
The code was removing "page" and "limit" parameters from the params dictionary, but these parameters were not being used afterwards. Removing this unnecessary code improves code readability and maintainability.
The code in the Select component was unnecessarily filtering the data based on the selected value. This logic was removed as it was not needed. Additionally, the placeholder text in the Select component was updated from "Flows" to "Both" to better reflect the options available.
refactor(market-card): remove unused code and console.log statements
fix(market-card): update saveFlowStore function to pass an array of tag ids instead of tag names
refactor(market-card): sort tags in ascending order of name length in the MarketCardComponent
refactor(market-card): update tag rendering in MarketCardComponent to use tag names instead of tag objects
refactor(market-card): remove commented out code and unused imports
refactor(market-card): update tag rendering in ShadTooltip component to use tag names instead of tag objects
refactor(market-card): update tag rendering in Button component to use tag names instead of tag objects
refactor(market-card): remove commented out code and unused imports
refactor(store/index): update tags property in storeComponent type to be an array of objects with id and name properties
The code was previously responsible for creating metadata for a component based on the nodes it contains. However, this functionality is no longer needed and has been removed to simplify the code and improve maintainability.
refactor(market-card): remove unnecessary blur effect and add opacity on hover to improve visual feedback
refactor(market-card): add condition to prevent adding to cart while loading to prevent multiple requests
fix(API/index.ts): update API endpoint for checkHasStore function to match backend route
feat(StorePage/index.tsx): add functionality to fetch and display store tags from backend
The import statement for the `getTagsIds` function from `storeUtils` was added to the `extraSidebarComponent` file. This function is used to retrieve the IDs of tags based on their names.
fix(extraSidebarComponent): remove duplicate getTagsIds function
The duplicate `getTagsIds` function in the `extraSidebarComponent` file was removed to avoid conflicts and improve code organization.
feat(extraSidebarComponent): update saveFlowStore function call to use getTagsIds function
The `saveFlowStore` function call in the `extraSidebarComponent` file was updated to use the `getTagsIds` function instead of directly passing the selected tags array. This change ensures that the IDs of the selected tags are used in the function call.
feat(nodeToolbarComponent): add import statement for getTagsIds function from storeUtils
The import statement for the `getTagsIds` function from `storeUtils` was added to the `nodeToolbarComponent` file. This function is used to retrieve the IDs of tags based on their names.
fix(nodeToolbarComponent): remove duplicate getTagsIds function
The duplicate `getTagsIds` function in the `nodeToolbarComponent` file was removed to avoid conflicts and improve code organization.
feat(nodeToolbarComponent): update saveFlowStore function call to use getTagsIds function
The `saveFlowStore` function call in the `nodeToolbarComponent` file was updated to use the `getTagsIds` function instead of directly passing the selected tags array. This change ensures that the IDs of the selected tags are used in the function call.
feat(storeUtils): add getTagsIds function
The `getTagsIds` function was added to the `storeUtils` file. This function takes an array of tag names and a reference to the tag list with IDs, and returns an array of tag IDs based on the names. This function is used in the `extraSidebarComponent` and `nodeToolbarComponent` files to retrieve the IDs of selected tags.
The `create_component` function in `store.py` has been modified to include the total count of each type in the metadata dictionary. This change improves the structure of the metadata and provides more comprehensive information about the types and their counts in the nodes.
🔧 fix(store.py): add missing metadata comment to clarify the purpose of the code block
✨ feat(store.py): add 'has_api_key' field to the response of 'check_if_store_is_enabled' endpoint to indicate if the user has an API key
🔧 fix(store.py): add missing metadata using the Component.data in the 'create_component' endpoint to properly handle component metadata