-
Notifications
You must be signed in to change notification settings - Fork 18
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
chore: refactored code to use custom hooks #86
Conversation
Coverage report
Show new covered files 🐣
Test suite run success24 tests passing in 3 suites. Report generated by 🧪jest coverage report action from 8ae10a7 |
src/hooks/use-modal.ts
Outdated
}, [hideModal]); | ||
|
||
useEffect(() => { | ||
if (!open && Platform.OS === 'android') { | ||
onDismiss?.(); |
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.
@azeezat , i see github action raise coverage issues here?. is this something we can address?
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.
@kofiarkoh Thank you for pointing this out. I just added some tests to address this.
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.
@kofiarkoh How do you currently use the hideModal
prop? I did some refactoring on the modal and I haven't been able to find a use case for it
…mple
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.
Clean Code!
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.
Great Job!
Description
Extracted most of the functions in the index.ts file into custom react hooks to improve readability. Feel free to check and comment on this PR. Everything should work as before so if you notice any changes, please drop a comment.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Added unit tests to ensure that the library continues to function as it currently does.
Checklist: