Fix/ohsome user stats#130
Merged
prabinoid merged 13 commits intodeployment/naxafrom Jul 18, 2025
Merged
Conversation
…em into query string This change allows passing an array of topics, which gets serialized into multiple `&topics=` query parameters for the ohsome stats API request
…API response format
…ters and include them as query params in the request and update function call accordingly
…ttings in ohsome statistics
remove url key and value
- Values < 1 are displayed with 3 decimal places - Values >= 1 are truncated (no rounding) - Handled edge case where value is exactly 0
- Removed local state and useEffect-based axios request for stats - Replaced with useOsmStatsQuery hook to fetch Ohsome statistics - Adapted to new API response structure with 'topics' field - Simplifies data fetching and aligns with query-driven architecture
- To implemnt on test case and ensure correct label and value is rendered
- Removed axios mock as stats fetching is now handled via useOsmStatsQuery - Organized tests under a 'Feature Stats Section' describe block for clarity and maintainability - Ensures correct values and labels are rendered using mocked hook data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Related Issue
Example: Fixes #123
Describe this PR
A brief description of how this solves the issue.
Screenshots
Please provide screenshots of the change.
Alternative Approaches Considered
Did you attempt any other approaches that are not documented in code?
Review Guide
Notes for the reviewer. How to test this change?
Checklist before requesting a review
[optional] What gif best describes this PR or how it makes you feel?