Skip to content

Commit

Permalink
imports
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Sep 2, 2020
1 parent 9c682f6 commit 2e36ea0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ import VisibilitySensor from 'react-visibility-sensor';
import { TimelineId } from '../../../../../../common/types/timeline';
import { BrowserFields, DocValueFields } from '../../../../../common/containers/source';
import { useTimelineDetails } from '../../../../containers/details';
import {
TimelineItem,
TimelineNonEcsData,
DetailItem,
} from '../../../../../../common/search_strategy/timeline';
import { Ecs } from '../../../../../../common/ecs';
import { TimelineItem, TimelineNonEcsData } from '../../../../../graphql/types';
import { DetailItem } from '../../../../../../common/search_strategy/timeline';
import { Note } from '../../../../../common/lib/note';
import { ColumnHeaderOptions, TimelineModel } from '../../../../../timelines/store/timeline/model';
import { AddNoteToEvent, UpdateNote } from '../../../notes/helpers';
Expand Down Expand Up @@ -239,7 +235,7 @@ const StatefulEventComponent: React.FC<Props> = ({
/>
</EventsTrSupplement>

{getRowRenderer<Ecs>(event.ecs, rowRenderers).renderRow({
{getRowRenderer(event.ecs, rowRenderers).renderRow({
browserFields,
data: event.ecs,
timelineId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const unhandledRowRenderer = (): never => {
throw new Error('Unhandled Row Renderer');
};

export const getRowRenderer = <T = Ecs>(ecs: T, rowRenderers: RowRenderer[]): RowRenderer => {
export const getRowRenderer = (ecs: Ecs, rowRenderers: RowRenderer[]): RowRenderer => {
const renderer = rowRenderers.find((rowRenderer) => rowRenderer.isInstance(ecs));
if (renderer == null) {
return unhandledRowRenderer();
Expand Down

0 comments on commit 2e36ea0

Please sign in to comment.