Skip to content
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

[Logs UI] Use react-intl FormattedRelative instead of a custom component #33146

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
*/

import { EuiButtonEmpty, EuiIcon, EuiProgress, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { FormattedMessage, FormattedRelative } from '@kbn/i18n/react';
import * as React from 'react';
import styled from 'styled-components';
import { RelativeTime } from './relative_time';

interface LogTextStreamLoadingItemViewProps {
alignment: 'top' | 'bottom';
Expand Down Expand Up @@ -52,10 +51,10 @@ export class LogTextStreamLoadingItemView extends React.PureComponent<
<EuiIcon type="clock" />
<FormattedMessage
id="xpack.infra.logs.lastStreamingUpdateText"
defaultMessage=" last updated {lastUpdateTime} ago"
defaultMessage=" last updated {lastUpdateTime}"
values={{
lastUpdateTime: (
<RelativeTime time={lastStreamingUpdate} refreshInterval={1000} />
<FormattedRelative value={lastStreamingUpdate} updateInterval={1000} />
),
}}
/>
Expand Down

This file was deleted.