-
Notifications
You must be signed in to change notification settings - Fork 70
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
feat: add owner check and conditional rendering for Fund component #261
feat: add owner check and conditional rendering for Fund component #261
Conversation
- Implemented owner check in the Fund component using `getOwner` from the contract. - Added conditional rendering for "Withdraw" and "Donate" buttons based on ownership and fund state. - Updated the `getDetails` function to include owner address retrieval. - Enhanced error handling for fetching fund details. - Improved user feedback with appropriate messages for different fund states.
{Number(fund.state) === 2 && ( | ||
<> | ||
{isOwner ? ( | ||
<p>You are the owner. Donations will go towards your funding goal.</p> |
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.
please remove this p
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.
nice work, just a little detail
Removed the p
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.
please reverse the changes to this file
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.
please do not upload conf files changes
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.
Lgtm great work homie
Pull Request
Closes [feat] Display withdraw btn only for owner #249
Commented the code
Changes description
getOwner
from the contract.getDetails
function to include owner address retrieval.Current output
Give evidence like screenshots of what your job looks like.
Time spent breakdown
Understanding Requirements and Planning(Repo structure): ~30 minutes
Implementing Owner Check and State Logic: ~1 hour
Conditional Rendering of Buttons: ~45 minutes
Refactoring getDetails Function: ~30 minutes
Comments
Super Happy to contribute to this amazing project, hope to keep contributing!!!