-
Notifications
You must be signed in to change notification settings - Fork 50
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
abstract localstorage useage #130
base: main
Are you sure you want to change the base?
abstract localstorage useage #130
Conversation
Hey @unegbuclinton thanks for the contribution. Do you mind resolving the merge conflict. |
@shivay-at-pieces thank you for reaching out, merge conflict has now been resolved. |
src/app/utils/useVersion.tsx
Outdated
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.
As we are not returning any Jsx, it's better to rename the file as useVersion.ts
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.
got it, file is now renamed to useVersion.ts
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.
LGTM
Description
This PR creates a separate hook for accessing and updating OS versions from local storage, so as to make Indicator.tsx cleaner and testable.
Issue #125
Changes:
Create a useVersion hook to handle accessing local storage
Update Indicator.tsx to use hook to access Version in local storage