Skip to content
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

Fix #5 - checked in counter #25

Merged
merged 5 commits into from
Aug 21, 2024

Conversation

RafaelCaso
Copy link
Contributor

@RafaelCaso RafaelCaso commented Aug 19, 2024

Description

  • create a component to read how many batch members have checked in
  • handle errors by leveraging readContract hook's error result
  • simple feedback in case of error
Screen Shot 2024-08-19 at 6 52 38 PM

Additional Information

Related Issues

Closes #{5}

  • open for batch to add improvements, styling, 🎶 stronger/faster/smarter code 🎶

Your ENS/address: 0xd1B41bE30F980315b8A6b754754aAa299C7abea2

Copy link

vercel bot commented Aug 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
batch8-buidlguidl-com-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2024 10:40pm

@derrekcoleman
Copy link
Collaborator

Hey @RafaelCaso! Thanks for this PR. You might have missed it with all of collective Lint issue shenanigans, but the build step is telling us something useful about your new component:

./components/CheckedInCounter.tsx
17:3 Warning: React Hook useEffect contains a call to 'setFeedback'. Without a list of dependencies, this can lead to an infinite chain of updates. To fix this, pass [checkInError, checkInLoading, checkedIn] as a second argument to the useEffect Hook. react-hooks/exhaustive-deps

Please add the dependencies to the useEffect and I'll get this merged 💪

@derrekcoleman derrekcoleman self-requested a review August 21, 2024 22:31
@derrekcoleman derrekcoleman linked an issue Aug 21, 2024 that may be closed by this pull request
@derrekcoleman derrekcoleman merged commit 02635b4 into BuidlGuidl:main Aug 21, 2024
3 checks passed
ruhneb2004 pushed a commit to ruhneb2004/batch8.buidlguidl.com that referenced this pull request Aug 22, 2024
* replace img with nextjs Image component

* Hotfix: fix linting issue

* add CheckInCounter component to read contract variable checkedInCounter

* fix: add dependencies to useEffect to avoid infinite chain of updates
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.

5. Get the check-in count from the BatchRegistry contract
2 participants