Changeset View
Changeset View
Standalone View
Standalone View
lib/utils/entity-text.js
// @flow | // @flow | ||||
import invariant from 'invariant'; | import invariant from 'invariant'; | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import type { GetENSNames } from './ens-helpers.js'; | import type { GetENSNames } from './ens-helpers.js'; | ||||
import { useENSNames } from '../hooks/ens-cache.js'; | import { useENSNames } from '../hooks/ens-cache.js'; | ||||
import { threadNoun } from '../shared/thread-utils.js'; | import { threadNoun } from '../shared/thread-utils.js'; | ||||
import { stringForUser } from '../shared/user-utils.js'; | import { stringForUser } from '../shared/user-utils.js'; | ||||
import { | import { type ThreadType, threadTypes } from '../types/thread-types-enum.js'; | ||||
threadTypes, | import { type RawThreadInfo, type ThreadInfo } from '../types/thread-types.js'; | ||||
type ThreadType, | |||||
type RawThreadInfo, | |||||
type ThreadInfo, | |||||
} from '../types/thread-types.js'; | |||||
import { basePluralize } from '../utils/text-utils.js'; | import { basePluralize } from '../utils/text-utils.js'; | ||||
type UserEntity = { | type UserEntity = { | ||||
+type: 'user', | +type: 'user', | ||||
+id: string, | +id: string, | ||||
+username?: ?string, | +username?: ?string, | ||||
+isViewer?: ?boolean, | +isViewer?: ?boolean, | ||||
+possessive?: ?boolean, // eg. `user's` instead of `user` | +possessive?: ?boolean, // eg. `user's` instead of `user` | ||||
▲ Show 20 Lines • Show All 527 Lines • Show Last 20 Lines |