-
Notifications
You must be signed in to change notification settings - Fork 133
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
Filter in notifications drawer #2875
Filter in notifications drawer #2875
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2875 +/- ##
==========================================
+ Coverage 63.67% 63.69% +0.01%
==========================================
Files 202 202
Lines 4650 4658 +8
Branches 858 859 +1
==========================================
+ Hits 2961 2967 +6
- Misses 1679 1681 +2
Partials 10 10
|
id: string; | ||
name: string; | ||
displayName: string; | ||
children: null | Bundle[]; |
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 think children can be optional children?: Bundle[]
. Or is there is a specific need for the null
value?
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.
Good catch! I think you're right.
@@ -124,7 +136,23 @@ const DrawerPanelBase = ({ innerRef }: DrawerPanelProps) => { | |||
); | |||
} | |||
}; | |||
const fetchFilterConfig = async () => { |
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.
Why is this function defined in useEffect
?
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 was following how the permissions were fetched after mounted
became true in the fetchPermissions
method.
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 see. The pattern used before is wrong. The mounted variable should be in ref so we don't have to do this. Its something for a future refactoring I guess.
RHCLOUD-29014
/api/notifications/v1/notifications/facets/bundles