-
Notifications
You must be signed in to change notification settings - Fork 3
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
Clean up contributor audio user experience #418
Conversation
✅ Deploy Preview for dailp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
export const useCognitoUserGroups = (): UserGroup[] => { | ||
const { user } = useContext(UserContext) | ||
const groups: string[] = | ||
user?.getSignInUserSession()?.getIdToken().payload["cognito:groups"] ?? [] | ||
return groups | ||
.map((g) => g.toUpperCase()) | ||
.filter((g): g is UserGroup => | ||
Object.values(UserGroup).includes(g as UserGroup) | ||
) | ||
} |
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.
We have a type for this so I decided we should up cast. Thoughts?
disabled={!(userRole == UserRole.EDITOR)} | ||
disabled={!(userRole == UserRole.Editor)} |
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.
Maybe this should be userGroups.includes(Dailp.UserGroup.Editors)
Based on external feedback the audio contribution experience has been changed to:
Old:

New:
