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

FIX-2121 Add wrapper around localStorage #2133

Merged
merged 6 commits into from
Nov 21, 2023

Conversation

eliasbruvik
Copy link
Contributor

@eliasbruvik eliasbruvik commented Nov 16, 2023

Fixes

This pull request fixes #2121

Description

Added wrapper functions around the use of localStorage so that errors are handled the same way throughout the application.

I decided to not use a custom hook as it would mean that it can only be used in components or other custom hooks, and there's no reason to not allow it in normal javascript functions.

Type of change

  • Bugfix
  • New feature (non-breaking change which adds functionality)
  • Enhancement of existing functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Impacted Areas in Application

  • Frontend
  • API
  • WITSML
  • Other (please describe)

Checklist:

Communication

  • I have made corresponding changes to the documentation
  • PR affects application security

Code quality

  • I have self-reviewed my code
  • No new warnings are generated

Test coverage

  • New code is covered by passing tests

Further comments

@eliasbruvik eliasbruvik changed the title Add wrapper around localStorage FIX-2121 Add wrapper around localStorage Nov 16, 2023
@eliasbruvik eliasbruvik marked this pull request as draft November 17, 2023 10:10
@eliasbruvik eliasbruvik marked this pull request as ready for review November 21, 2023 10:49
Copy link
Contributor

@janmarius janmarius left a comment

Choose a reason for hiding this comment

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

Reviewer checklist

  • Read issue and PR
  • Pulled branch and manually tested
  • Verify that PR resolves issue
  • Reviewed the code

@eliasbruvik eliasbruvik merged commit d0642d8 into equinor:main Nov 21, 2023
1 check passed
@eliasbruvik eliasbruvik deleted the FIX-2121-localstorage branch November 21, 2023 13:56
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.

Add a wrapper around localStorage
2 participants