Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

unegbuclinton
Copy link

@unegbuclinton unegbuclinton commented Jun 20, 2024

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

@shivay-at-pieces
Copy link
Contributor

Hey @unegbuclinton thanks for the contribution. Do you mind resolving the merge conflict.

@unegbuclinton
Copy link
Author

@shivay-at-pieces thank you for reaching out, merge conflict has now been resolved.

Copy link
Contributor

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

Copy link
Author

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

Copy link
Contributor

@Arindam200 Arindam200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants