-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Analytics] Air quality cards UI and functionality #1650
Conversation
New next-platform changes available for preview here |
1 similar comment
New next-platform changes available for preview here |
- set default grids to lagos, madagascar, nairobi, and kampala
New next-platform changes available for preview here |
New next-platform changes available for preview here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Codebmk , thanks for this! Good progress indeed!
Just a couple of changes required to get things moving.
const chartDataRange = useSelector((state) => state.chart.chartDataRange); | ||
const userDefaults = useSelector((state) => state.userDefaults.defaults); | ||
const [grids, setGrids] = useState([ | ||
'64b7baccf2b99f00296acd59', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Codebmk , thanks for this. Can we set these as variables? Somewhere in a constants file? This is just good practice. Please note that we do NOT have to create secrets or ENVs, we just need to put all constants in one place ---- as a best practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
const dispatch = useDispatch(); | ||
const recentLocationMeasurements = useSelector((state) => state.recentMeasurements.measurements); | ||
const chartDataRange = useSelector((state) => state.chart.chartDataRange); | ||
const userDefaults = useSelector((state) => state.userDefaults.defaults); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Codebmk , since we are moving towards using Preferences, please consider using Preferences
endpoints for this. For context, Preferences
was implemented last week and it is fully ready to be utilised.
Background to this change from Defaults to Preferences:
- It was discovered that Defaults had so many issues that could not be fixed so we just decided to create a completely new set of endpoints for Analytics Redesign.
- We might also to discontinue the usage of Defaults in the Old Analytics (Netmanager) and completely switch to Preferences all throughout our Systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New next-platform changes available for preview here |
New next-platform changes available for preview here |
} | ||
setIsLoadingMeasurements(false); | ||
}, [userLocationsData]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated to using preferences @Baalmart
New next-platform changes available for preview here |
New next-platform changes available for preview here |
New next-platform changes available for preview here |
New next-platform changes available for preview here |
New next-platform changes available for preview here |
New next-platform changes available for preview here |
Summary of Changes (What does this PR do?)
Status of maturity (all need to be checked before merging):
How should this be manually tested?
What are the relevant tickets?
Screenshots (optional)