BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[BUG] - Incorrect conditional rendering logic to display profile stats

Open ShubhamSj07 opened this issue 3 years ago • 5 comments

Description

The issue with the short-circuit operator (&&) in React when dealing with zero value, using an example.

true && "works?" -> works? 0 && "works?" -> 0 -> which gets rendered on UI.

image

Fix: use double bang operator to convert value to either true or false

image

Screenshots

image

Additional information

No response

ShubhamSj07 avatar Aug 17 '23 14:08 ShubhamSj07

To reduce notifications, issues are locked until they are https://github.com/EddieHubCommunity/LinkFree/labels/%F0%9F%8F%81%20status%3A%20ready%20for%20dev and to be assigned. You can learn more in our contributing guide https://github.com/EddieHubCommunity/LinkFree/blob/main/CONTRIBUTING.md

github-actions[bot] avatar Aug 17 '23 14:08 github-actions[bot]

The issue has been unlocked and is now ready for dev. If you would like to work on this issue, you can comment to have it assigned to you. You can learn more in our contributing guide https://github.com/EddieHubCommunity/BioDrop/blob/main/CONTRIBUTING.md

github-actions[bot] avatar Aug 28 '23 08:08 github-actions[bot]

Thank you for the great issue!

SaraJaoude avatar Aug 28 '23 08:08 SaraJaoude

This fix "Fix: use double bang operator to convert value to either true or false" will work. I can work on this issue. pls assign to me

ZeeMonk-pixel avatar Aug 29 '23 18:08 ZeeMonk-pixel

This fix "Fix: use double bang operator to convert value to either true or false" will work. I can work on this issue. pls assign to me

@ZeeMonk-pixel I will assign this to you

SaraJaoude avatar Aug 30 '23 08:08 SaraJaoude