Introduce Service Id Types

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
Fedor Indutny 2023-08-10 18:43:33 +02:00 committed by Jamie Kyle
parent 414c0a58d3
commit 366b875fd2
269 changed files with 5832 additions and 5550 deletions

View file

@ -5,6 +5,7 @@ import type { ReactNode, FunctionComponent } from 'react';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import classNames from 'classnames';
import { isBoolean, isNumber } from 'lodash';
import { v4 as generateUuid } from 'uuid';
import { Avatar, AvatarSize } from '../Avatar';
import type { BadgeType } from '../../badges/types';
@ -16,7 +17,6 @@ import { Spinner } from '../Spinner';
import { Time } from '../Time';
import { formatDateTimeShort } from '../../util/timestamp';
import * as durations from '../../util/durations';
import { UUID } from '../../types/UUID';
const BASE_CLASS_NAME =
'module-conversation-list__item--contact-or-conversation';
@ -113,7 +113,7 @@ export const BaseConversationListItem: FunctionComponent<PropsType> =
} = props;
const identifier = id ? cleanId(id) : undefined;
const htmlId = useMemo(() => UUID.generate().toString(), []);
const htmlId = useMemo(() => generateUuid(), []);
const testId = overrideTestId || groupId || uuid;
const isUnread = isConversationUnread({ markedUnread, unreadCount });