-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Security Solution] Refactor Timeline Notes to use EuiCommentList #85256
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
Changes from all commits
bf22803
c1ec96f
28b51e5
b5bc4f0
9973744
5a65c46
d1bd98f
76785e7
e1f07c4
448acd7
4ac5a96
653415a
b29cd52
31f2674
6b54390
1980e89
8eeca9b
4a3680c
93b957e
755ac96
46de710
3c8cfbf
72c543e
ea36541
107c945
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| import React, { useState } from 'react'; | ||
| import { createPortalNode, OutPortal } from 'react-reverse-portal'; | ||
|
|
||
| /** | ||
| * A singleton portal for rendering content in the global header | ||
| */ | ||
| const timelineEventsCountPortalNodeSingleton = createPortalNode(); | ||
|
|
||
| export const useTimelineEventsCountPortal = () => { | ||
| const [timelineEventsCountPortalNode] = useState(timelineEventsCountPortalNodeSingleton); | ||
|
|
||
| return { timelineEventsCountPortalNode }; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why don't you return
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's a good question @cnasikas
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. I am trying to understand it :). |
||
| }; | ||
|
|
||
| export const TimelineEventsCountBadge = React.memo(() => { | ||
| const { timelineEventsCountPortalNode } = useTimelineEventsCountPortal(); | ||
|
|
||
| return <OutPortal node={timelineEventsCountPortalNode} />; | ||
| }); | ||
|
|
||
| TimelineEventsCountBadge.displayName = 'TimelineEventsCountBadge'; | ||
Uh oh!
There was an error while loading. Please reload this page.