-
-
Notifications
You must be signed in to change notification settings - Fork 730
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: Personal flags UI component #8221
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
export const PersonalDashboard = () => { | ||
const { user } = useAuthUser(); | ||
|
||
const name = user?.name; | ||
|
||
const { projects, activeProject, setActiveProject } = useProjects(); | ||
|
||
const { personalDashboard } = usePersonalDashboard(); |
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.
I will extract this code into a custom hook once we find shared items between flags and projects
personalDashboard?.flags.length && | ||
personalDashboard?.flags.length > 0 |
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.
Is this meant to be more like this (though both will work)?
personalDashboard?.flags.length && | |
personalDashboard?.flags.length > 0 | |
personalDashboard?.flags && | |
personalDashboard?.flags.length > 0 |
We should also be able to simplify it:
personalDashboard?.flags.length && | |
personalDashboard?.flags.length > 0 | |
personalDashboard?.flags.length > 0 |
though TS might require us to do
personalDashboard?.flags.length && | |
personalDashboard?.flags.length > 0 | |
(personalDashboard?.flags.length ?? 0) > 0 |
at which point ... maybe?
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.
if(personalDashboard?.flags.length)
will do
About the changes
Details:
Important files
Discussion points