mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-21 00:48:19 +01:00
Migrate conversations to ESLint
This commit is contained in:
committed by
Josh Perez
parent
b4f0f3c685
commit
372aa44e49
@@ -16,18 +16,15 @@ export type Props = {
|
||||
const FAKE_DURATION = 1000;
|
||||
|
||||
export class TimelineLoadingRow extends React.PureComponent<Props> {
|
||||
public renderContents() {
|
||||
public renderContents(): JSX.Element {
|
||||
const { state, duration, expiresAt, onComplete } = this.props;
|
||||
|
||||
if (state === 'idle') {
|
||||
const fakeExpiresAt = Date.now() - FAKE_DURATION;
|
||||
|
||||
return <Countdown duration={FAKE_DURATION} expiresAt={fakeExpiresAt} />;
|
||||
} else if (
|
||||
state === 'countdown' &&
|
||||
isNumber(duration) &&
|
||||
isNumber(expiresAt)
|
||||
) {
|
||||
}
|
||||
if (state === 'countdown' && isNumber(duration) && isNumber(expiresAt)) {
|
||||
return (
|
||||
<Countdown
|
||||
duration={duration}
|
||||
@@ -40,7 +37,7 @@ export class TimelineLoadingRow extends React.PureComponent<Props> {
|
||||
return <Spinner size="24" svgSize="small" direction="on-background" />;
|
||||
}
|
||||
|
||||
public render() {
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<div className="module-timeline-loading-row">{this.renderContents()}</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user