React 17.x upgrade fixes
This commit is contained in:
parent
1e1313a023
commit
a83f785b73
4 changed files with 14 additions and 14 deletions
|
@ -170,7 +170,7 @@ class PrivacyDropdown extends React.PureComponent {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
const { intl: { formatMessage } } = this.props;
|
const { intl: { formatMessage } } = props;
|
||||||
|
|
||||||
this.options = [
|
this.options = [
|
||||||
{ icon: 'globe', value: 'public', text: formatMessage(messages.public_short), meta: formatMessage(messages.public_long) },
|
{ icon: 'globe', value: 'public', text: formatMessage(messages.public_short), meta: formatMessage(messages.public_long) },
|
||||||
|
|
|
@ -64,6 +64,17 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
fields: normalizeFields(Array.from({ length: MAX_FIELDS })),
|
fields: normalizeFields(Array.from({ length: MAX_FIELDS })),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
const initialState = props.account.withMutations(map => {
|
||||||
|
map.merge(map.get('source'));
|
||||||
|
map.delete('source');
|
||||||
|
map.set('fields', normalizeFields(map.get('fields')));
|
||||||
|
unescapeParams(map, ['display_name', 'note']);
|
||||||
|
});
|
||||||
|
this.state = initialState.toObject();
|
||||||
|
}
|
||||||
|
|
||||||
makePreviewAccount = () => {
|
makePreviewAccount = () => {
|
||||||
const { account } = this.props;
|
const { account } = this.props;
|
||||||
return account.merge(ImmutableMap({
|
return account.merge(ImmutableMap({
|
||||||
|
@ -117,17 +128,6 @@ class EditProfile extends ImmutablePureComponent {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
const initialState = this.props.account.withMutations(map => {
|
|
||||||
map.merge(map.get('source'));
|
|
||||||
map.delete('source');
|
|
||||||
map.set('fields', normalizeFields(map.get('fields')));
|
|
||||||
unescapeParams(map, ['display_name', 'note']);
|
|
||||||
});
|
|
||||||
this.state = initialState.toObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
handleCheckboxChange = e => {
|
handleCheckboxChange = e => {
|
||||||
this.setState({ [e.target.name]: e.target.checked });
|
this.setState({ [e.target.name]: e.target.checked });
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ class Create extends React.PureComponent {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.props.reset();
|
props.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTitleChange = e => {
|
handleTitleChange = e => {
|
||||||
|
|
|
@ -87,7 +87,7 @@ class Introduction extends React.PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.pages = [
|
this.pages = [
|
||||||
<FrameWelcome domain={this.props.domain} onNext={this.handleNext} />,
|
<FrameWelcome domain={props.domain} onNext={this.handleNext} />,
|
||||||
<FrameFederation onNext={this.handleNext} />,
|
<FrameFederation onNext={this.handleNext} />,
|
||||||
<FrameInteractions onNext={this.handleFinish} />,
|
<FrameInteractions onNext={this.handleFinish} />,
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue