Skip to content

Conversation

@serasm
Copy link

@serasm serasm commented Oct 25, 2025

Changes:

  1. Decoupled utils.ts file, reused Utils directory and put there all of the utils
  2. Created new directory Context and moved useAuthContext file
  3. Refactored error handling.

Refactored error handling by:

  1. Created new mapping method inside errorsUtils file
  2. Extracted an interface from useAuth to errorsUtils
  3. Changed the definition and implementation of handleError method
  4. I used of changed handleError and created mapper in useAuth file

I divided the responsibilities between the files. I renamed the files.
Refactoring the Utils directory and the utils.ts file resulted in changes to imports. I had to change the paths.
I created a new Contexts directory because it didn't exist. I moved one file that should be in it to that directory.
The change in the location of the useAuthContext file also forced a change in the import paths.
Changes to the errorsUtils, added mapper. Changes to useAuth to implement the errorsUtils methods.
@serasm
Copy link
Author

serasm commented Oct 26, 2025

Fixes #84

@0010aor
Copy link
Owner

0010aor commented Oct 26, 2025

Fixes #84

thanks for the pr, i will take a look to it soon

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.

2 participants