-
Notifications
You must be signed in to change notification settings - Fork 9
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: hide credit class entry if no credit class #2214
Conversation
✅ Deploy Preview for regen-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@erikalogie you can check that we no longer display the credit class entry incorrectly here: https://deploy-preview-2214--regen-marketplace.netlify.app/ |
@flagrede looks good! |
Logging in with a credit class admin regen1df675r9vnf7pdedn4sf26svdsem3ugavgxmy46: http://redwood.regen.network:1317/regen/ecocredit/v1/classes-by-admin/regen1df675r9vnf7pdedn4sf26svdsem3ugavgxmy46, I'm now not seeing the credit classes tab/menu item at all: It's still there on the public profile: https://deploy-preview-2214--regen-marketplace.netlify.app/profiles/regen1df675r9vnf7pdedn4sf26svdsem3ugavgxmy46/credit-classes |
web-marketplace/src/components/organisms/RegistryLayout/RegistryLayout.Header.tsx
Outdated
Show resolved
Hide resolved
a04491a
to
c284e7e
Compare
} = useProfileItems({}); | ||
const { activeAccount } = useAuth(); | ||
const { wallet, isConnected, accountByAddr } = useWallet(); | ||
} = useProfileItems({ address: wallet?.address }); |
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.
} = useProfileItems({ address: wallet?.address }); | |
} = useProfileItems({}); |
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.
tACK
Description
Closes: #2205
Hide credit class entry in the user dropdown menu if the user has no credit class.
The credit class item was displayed in the user menu because if the allowed list param is not activated on the current chain, we display it by default. See this hook for more info.
The tab was not displayed in the user profile because we also checked the number of credit classes created there. This PR adds the same check for the user menu entry.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
How to test
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...