♻️ Refactor the input value get logic#5743
Merged
martijnrusschen merged 3 commits intoHacker0x01:mainfrom Aug 9, 2025
Merged
Conversation
- Move the input value get logic to a seperate function - Refactor the nested conditional statements to if else conditions for readability
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5743 +/- ##
==========================================
+ Coverage 97.13% 97.19% +0.06%
==========================================
Files 30 30
Lines 3380 3382 +2
Branches 1411 1426 +15
==========================================
+ Hits 3283 3287 +4
+ Misses 97 93 -4
- Partials 0 2 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…dle both null and undefined case
9e3be9e to
66df4dc
Compare
Contributor
Author
|
As I was getting an issue in the test coverage to reach the default value set for dateFormat, I added Nullish Coalescing Operator to to handling both undefined and null case of dateFormat (like we use in other places of index.tsx) and added a new commit. |
Member
|
Can you take a look at the merge conflict? |
Contributor
Author
|
Resolved the conflict @martijnrusschen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is not about any new features or bug fixes. It is about refactoring the code to make it more readable and maintainable.
Changes
Screenshots
Old Code

New Code

I didn't change anything in the get logic, instead just refactored the existing logic to a readable format.
Contribution checklist