Skip to content

abstract localstorage useage#130

Open
unegbuclinton wants to merge 5 commits into
pieces-app:mainfrom
unegbuclinton:SD-localstorage-useage
Open

abstract localstorage useage#130
unegbuclinton wants to merge 5 commits into
pieces-app:mainfrom
unegbuclinton:SD-localstorage-useage

Conversation

@unegbuclinton

@unegbuclinton unegbuclinton commented Jun 20, 2024

Copy link
Copy Markdown

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

@shivaypiece

Copy link
Copy Markdown
Contributor

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

@unegbuclinton

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
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
Copy Markdown
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

@Arindam200 Arindam200 left a comment

Copy link
Copy Markdown
Contributor

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