Add types for <ConversationHeader>'s mute options

This commit is contained in:
Evan Hahn 2021-04-01 16:02:22 -05:00 committed by Josh Perez
parent cf50550936
commit 130dac527f
2 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ import { InContactsIcon } from '../InContactsIcon';
import { LocalizerType } from '../../types/Util';
import { ColorType } from '../../types/Colors';
import { getMuteOptions } from '../../util/getMuteOptions';
import { MuteOption, getMuteOptions } from '../../util/getMuteOptions';
import {
ExpirationTimerOptions,
TimerOption,
@ -375,7 +375,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
onMoveToInbox,
} = this.props;
const muteOptions = [];
const muteOptions: Array<MuteOption> = [];
if (isMuted(muteExpiresAt)) {
const expires = moment(muteExpiresAt);
const muteExpirationLabel = moment().isSame(expires, 'day')

View file

@ -1,10 +1,10 @@
// Copyright 2020 Signal Messenger, LLC
// Copyright 2020-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import moment from 'moment';
import { LocalizerType } from '../types/Util';
type MuteOption = {
export type MuteOption = {
name: string;
disabled?: boolean;
value: number;