Changeset View
Changeset View
Standalone View
Standalone View
web/modals/threads/settings/thread-settings-relationship-tab.react.js
// @flow | // @flow | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { type SetState } from 'lib/types/hook-types'; | import { type SetState } from 'lib/types/hook-types'; | ||||
import { type RelationshipButton } from 'lib/types/relationship-types'; | import { type RelationshipButton } from 'lib/types/relationship-types'; | ||||
import type { UserInfo } from 'lib/types/user-types'; | import type { UserInfo } from 'lib/types/user-types'; | ||||
import ThreadSettingsRelationshipButton from './thread-settings-relationship-button.react'; | import ThreadSettingsRelationshipButton from './thread-settings-relationship-button.react'; | ||||
import css from './thread-settings-relationship-tab.css'; | import css from './thread-settings-relationship-tab.css'; | ||||
type Props = { | type Props = { | ||||
+setErrorMessage: SetState<string>, | +setErrorMessage: SetState<?string>, | ||||
+relationshipButtons: $ReadOnlyArray<RelationshipButton>, | +relationshipButtons: $ReadOnlyArray<RelationshipButton>, | ||||
+otherUserInfo: UserInfo, | +otherUserInfo: UserInfo, | ||||
}; | }; | ||||
function ThreadSettingsRelationshipTab(props: Props): React.Node { | function ThreadSettingsRelationshipTab(props: Props): React.Node { | ||||
const { relationshipButtons, otherUserInfo, setErrorMessage } = props; | const { relationshipButtons, otherUserInfo, setErrorMessage } = props; | ||||
const buttons = React.useMemo( | const buttons = React.useMemo( | ||||
() => | () => | ||||
Show All 14 Lines |