signal-desktop/ts/components/conversation/LastSeenIndicator.tsx
2020-08-28 15:42:24 -04:00

26 lines
616 B
TypeScript

import React from 'react';
import { LocalizerType } from '../../types/Util';
export type Props = {
count: number;
i18n: LocalizerType;
};
export class LastSeenIndicator extends React.Component<Props> {
public render() {
const { count, i18n } = this.props;
const message =
count === 1
? i18n('unreadMessage')
: i18n('unreadMessages', [String(count)]);
return (
<div className="module-last-seen-indicator">
<div className="module-last-seen-indicator__bar" />
<div className="module-last-seen-indicator__text">{message}</div>
</div>
);
}
}