0
0
Fork 0

Use Immutable Record for accounts in Redux state (#26559)

This commit is contained in:
Renaud Chaput 2023-11-03 16:00:03 +01:00 committed by GitHub
parent 9d799d40ba
commit 3bf2a7296e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 765 additions and 662 deletions

View file

@ -36,7 +36,7 @@ class Account extends ImmutablePureComponent {
static propTypes = {
size: PropTypes.number,
account: ImmutablePropTypes.map,
account: ImmutablePropTypes.record,
onFollow: PropTypes.func.isRequired,
onBlock: PropTypes.func.isRequired,
onMute: PropTypes.func.isRequired,

View file

@ -1,7 +1,8 @@
import classNames from 'classnames';
import type { Account } from 'mastodon/models/account';
import { useHovering } from '../../hooks/useHovering';
import type { Account } from '../../types/resources';
import { autoPlayGif } from '../initial_state';
interface Props {

View file

@ -1,5 +1,6 @@
import type { Account } from 'mastodon/models/account';
import { useHovering } from '../../hooks/useHovering';
import type { Account } from '../../types/resources';
import { autoPlayGif } from '../initial_state';
interface Props {

View file

@ -2,7 +2,8 @@ import React from 'react';
import type { List } from 'immutable';
import type { Account } from '../../types/resources';
import type { Account } from 'mastodon/models/account';
import { autoPlayGif } from '../initial_state';
import { Skeleton } from './skeleton';

View file

@ -19,7 +19,7 @@ const makeMapStateToProps = () => {
class InlineAccount extends PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
account: ImmutablePropTypes.record.isRequired,
};
render () {

View file

@ -80,7 +80,7 @@ class Status extends ImmutablePureComponent {
static propTypes = {
status: ImmutablePropTypes.map,
account: ImmutablePropTypes.map,
account: ImmutablePropTypes.record,
previousId: PropTypes.string,
nextInReplyToId: PropTypes.string,
rootId: PropTypes.string,