Skip to content

Commit

Permalink
Add EuiThemeProvider to fix crashing bug
Browse files Browse the repository at this point in the history
We use the LogStream component and it was broken after implementing KibanaThemeProvider. The fix is to re-introduce EuiThemeProvider as a wrapper around the component that uses styled-components
  • Loading branch information
scottybollinger committed Feb 8, 2022
1 parent e5678ff commit 3b7f792
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React from 'react';

import { EuiThemeProvider } from '../../../../../../../src/plugins/kibana_react/common';
import { LogStream, LogStreamProps } from '../../../../../infra/public';

import { LOGS_SOURCE_ID } from '../../../../common/constants';
Expand Down Expand Up @@ -37,11 +38,13 @@ export const EntSearchLogStream: React.FC<Props> = ({
if (!startTimestamp) startTimestamp = endTimestamp - hoursAgo * 60 * 60 * 1000;

return (
<LogStream
sourceId={LOGS_SOURCE_ID}
startTimestamp={startTimestamp}
endTimestamp={endTimestamp}
{...props}
/>
<EuiThemeProvider>
<LogStream
sourceId={LOGS_SOURCE_ID}
startTimestamp={startTimestamp}
endTimestamp={endTimestamp}
{...props}
/>
</EuiThemeProvider>
);
};

0 comments on commit 3b7f792

Please sign in to comment.