BuidlGuidl / batch7.buidlguidl.com

Home base for BuidlGuidl's 7th Batch of Buidlers
https://batch7.buidlguidl.com/
MIT License
4 stars 10 forks source link

Added connected wallet info #18

Closed oguzsabi closed 1 month ago

oguzsabi commented 1 month ago

Description

In order to display the necessary statuses of the connected wallet, I followed the advice on the related issue (#4) and added the status icons to the left of the account balance.

Until a wallet is fully connected (status === 'connected'), status icons are not displayed and a skeleton loader is displayed in their place. Once the wallet is connected and each icon's related information is received, the icons are displayed with their current statuses.

When displaying the icons, green and gray colors are used to describe positive and non-positive states of their related statuses. Also, for each icon a tooltip is used to display what the icon itself and its color mean.

useScaffoldEventHistory function is used to get the checked-in user information and useScaffoldReadContract is used to get the user's presence within the allowList.

The following screenshots display all the possible statuses of these icons:

2024-07-12 01_01_42-Scaffold-ETH 2 App — Mozilla Firefox 2024-07-12 01_01_15-Scaffold-ETH 2 App — Mozilla Firefox 2024-07-12 00_57_16-Scaffold-ETH 2 App — Mozilla Firefox 2024-07-12 00_58_00-Scaffold-ETH 2 App — Mozilla Firefox 2024-07-12 00_58_55-Scaffold-ETH 2 App — Mozilla Firefox 2024-07-12 00_59_23-Scaffold-ETH 2 App — Mozilla Firefox 2024-07-12 00_59_29-Scaffold-ETH 2 App — Mozilla Firefox 2024-07-12 00_59_35-Scaffold-ETH 2 App — Mozilla Firefox

These icons are also compatible with most mobile screen sizes: image

However, for smaller screens the AddressInfoDropdown component's contents wrap themselves: image

Related Issues

Closes #4

Address: 0x97d45F88468289ac299B79cF01bbB6f218c46230

vercel[bot] commented 1 month ago

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

Name Status Preview Comments Updated (UTC)
batch7-buidlguidl-com-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2024 4:28pm
derrekcoleman commented 1 month ago

@oguzsabi, a small suggestion: if a user is not on the allowList, they can never be checked in. To make the UI simpler in that specific case, maybe we could hide the checked in icon unless the user is on the allowList?

oguzsabi commented 1 month ago

@oguzsabi, a small suggestion: if a user is not on the allowList, they can never be checked in. To make the UI simpler in that specific case, maybe we could hide the checked in icon unless the user is on the allowList?

Yup, you are definitely right, I made the necessary adjustment to hide the checked in icon if the user is not in the allow list. Also I believe the lint check is failing due to a recent merge, is that correct?

derrekcoleman commented 1 month ago

Also I believe the lint check is failing due to a recent merge, is that correct?

I just pushed a hotfix for that. Want to try git pull or rebase onto main again to solve the ci error before we merge?

oguzsabi commented 1 month ago

Also I believe the lint check is failing due to a recent merge, is that correct?

I just pushed a hotfix for that. Want to try git pull or rebase onto main again to solve the ci error before we merge?

Just rebased, it seems to be good now.