feat: add indoor vs outdoor air quality comparison (Closes #472) - #524
Open
Kushal-prime wants to merge 2 commits into
Open
feat: add indoor vs outdoor air quality comparison (Closes #472)#524Kushal-prime wants to merge 2 commits into
Kushal-prime wants to merge 2 commits into
Conversation
|
@superman32432432 is attempting to deploy a commit to the Aditya Mahajan's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thank You for Your Contribution! 🎉Hi @Kushal-prime, Thank you for opening this Pull Request and contributing to our project. We truly appreciate your efforts.
The maintainer @Aditya8369 will review your PR shortly! Happy Contributing! 🚀 |
Owner
|
@Kushal-prime pls solve conflicts and provide screenshot |
Owner
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.
Summary
This PR implements the Indoor vs. Outdoor Air Quality Comparison feature requested in #472.
The feature enables users to manually record indoor air quality readings, compare them with the current outdoor air quality, and receive contextual recommendations to help improve indoor air conditions.
Changes Made
Added a new
IndoorTrackercomponent.Created a form for entering:
Added input validation to ensure only valid values are accepted.
Persisted indoor readings to
localStoragewith a timestamp.Displayed a side-by-side comparison of indoor and outdoor air quality.
Reused the existing Recharts library to visualize indoor vs. outdoor PM2.5 values.
Generated contextual recommendations based on the comparison (e.g., ventilation suggestions when indoor air quality is worse).
Integrated the component into the dashboard without introducing additional API calls.
Added unit tests covering validation, persistence, rendering, and comparison behavior.
Technical Details
pollution_hub_indoor_aqiinlocalStorage.JSON.parseoperations intry/catchto safely handle invalid or missing stored data.Testing
npm run lintpassesnpm run buildcompletes successfullyNotes
Closes #472