diff --git a/stylesheets/_modules.scss b/stylesheets/_modules.scss index ed30fc502..3af867ec2 100644 --- a/stylesheets/_modules.scss +++ b/stylesheets/_modules.scss @@ -653,11 +653,14 @@ // Module: Expire Timer +.module-expire-timer-margin { + margin-left: 6px; +} + .module-expire-timer { width: 12px; height: 12px; display: inline-block; - margin-left: 6px; margin-bottom: 2px; @include color-svg('../images/timer-60.svg', $color-gray-60); } diff --git a/ts/components/conversation/ExpireTimer.tsx b/ts/components/conversation/ExpireTimer.tsx index cd66055fd..929f386c9 100644 --- a/ts/components/conversation/ExpireTimer.tsx +++ b/ts/components/conversation/ExpireTimer.tsx @@ -47,11 +47,27 @@ export class ExpireTimer extends React.Component { } = this.props; const bucket = getTimerBucket(expirationTimestamp, expirationLength); + let timeLeft = Math.round((expirationTimestamp - Date.now()) / 1000); + timeLeft = timeLeft >= 0 ? timeLeft : 0; + if (timeLeft <= 60) { + return ( + + {timeLeft} + + ); + } return (