Use DurationInSeconds for expireTimer

This commit is contained in:
Fedor Indutny 2022-11-16 12:18:02 -08:00 committed by GitHub
parent cf57c7aaf0
commit 6be69a7ba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 411 additions and 216 deletions

View file

@ -2,13 +2,13 @@
// SPDX-License-Identifier: AGPL-3.0-only
import * as React from 'react';
import * as moment from 'moment';
import { times } from 'lodash';
import { v4 as uuid } from 'uuid';
import { text, boolean, number } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import { setupI18n } from '../../util/setupI18n';
import { DurationInSeconds } from '../../util/durations';
import enMessages from '../../../_locales/en/messages.json';
import type { PropsType } from './Timeline';
import { Timeline } from './Timeline';
@ -135,7 +135,7 @@ const items: Record<string, TimelineItemType> = {
type: 'timerNotification',
data: {
disabled: false,
expireTimer: moment.duration(2, 'hours').asSeconds(),
expireTimer: DurationInSeconds.fromHours(2),
title: "It's Me",
type: 'fromMe',
},
@ -145,7 +145,7 @@ const items: Record<string, TimelineItemType> = {
type: 'timerNotification',
data: {
disabled: false,
expireTimer: moment.duration(2, 'hours').asSeconds(),
expireTimer: DurationInSeconds.fromHours(2),
title: '(202) 555-0000',
type: 'fromOther',
},