Updated modals that use features to be async loaded with WrappedBundle
• Updated: - modals that use features to be async loaded with WrappedBundle
This commit is contained in:
parent
ddca693cfc
commit
1c2cb6a63a
@ -2,7 +2,8 @@ import React from 'react'
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { defineMessages, injectIntl } from 'react-intl'
|
import { defineMessages, injectIntl } from 'react-intl'
|
||||||
import ModalLayout from './modal_layout'
|
import ModalLayout from './modal_layout'
|
||||||
import GroupCreate from '../../features/group_create'
|
import { GroupCreate } from '../../features/ui/util/async_components'
|
||||||
|
import WrappedBundle from '../../features/ui/util/wrapped_bundle'
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
title: { id: 'create_group', defaultMessage: 'Create group' },
|
title: { id: 'create_group', defaultMessage: 'Create group' },
|
||||||
@ -30,7 +31,7 @@ class GroupCreateModal extends React.PureComponent {
|
|||||||
width={440}
|
width={440}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
>
|
>
|
||||||
<GroupCreate onCloseModal={onClose} params={{ id: groupId }} />
|
<WrappedBundle component={GroupCreate} componentParams={{ id: groupId, onCloseModal: onClose }} />
|
||||||
</ModalLayout>
|
</ModalLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@ import PropTypes from 'prop-types'
|
|||||||
import { defineMessages, injectIntl } from 'react-intl'
|
import { defineMessages, injectIntl } from 'react-intl'
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||||
import ModalLayout from './modal_layout'
|
import ModalLayout from './modal_layout'
|
||||||
import ListEdit from '../../features/list_edit'
|
import { ListEdit } from '../../features/ui/util/async_components'
|
||||||
|
import WrappedBundle from '../../features/ui/util/wrapped_bundle'
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
title: { id: 'lists.edit', defaultMessage: 'Edit list' },
|
title: { id: 'lists.edit', defaultMessage: 'Edit list' },
|
||||||
@ -29,7 +30,7 @@ class ListEditorModal extends ImmutablePureComponent {
|
|||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
noPadding
|
noPadding
|
||||||
>
|
>
|
||||||
<ListEdit id={id} />
|
<WrappedBundle component={ListEdit} componentParams={{ id }} />
|
||||||
</ModalLayout>
|
</ModalLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@ import PropTypes from 'prop-types'
|
|||||||
import { defineMessages, injectIntl } from 'react-intl'
|
import { defineMessages, injectIntl } from 'react-intl'
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||||
import StatusLikes from '../../features/status_likes'
|
import { StatusLikes } from '../../features/ui/util/async_components'
|
||||||
|
import WrappedBundle from '../../features/ui/util/wrapped_bundle'
|
||||||
import ModalLayout from './modal_layout'
|
import ModalLayout from './modal_layout'
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
@ -38,7 +39,7 @@ class StatusLikesModal extends ImmutablePureComponent {
|
|||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
noPadding
|
noPadding
|
||||||
>
|
>
|
||||||
<StatusLikes params={params} />
|
<WrappedBundle component={StatusLikes} componentParams={params} />
|
||||||
</ModalLayout>
|
</ModalLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@ import PropTypes from 'prop-types'
|
|||||||
import { defineMessages, injectIntl } from 'react-intl'
|
import { defineMessages, injectIntl } from 'react-intl'
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||||
import StatusReposts from '../../features/status_reposts'
|
import { StatusReposts } from '../../features/ui/util/async_components'
|
||||||
|
import WrappedBundle from '../../features/ui/util/wrapped_bundle'
|
||||||
import ModalLayout from './modal_layout'
|
import ModalLayout from './modal_layout'
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
@ -38,7 +39,7 @@ class StatusRepostsModal extends ImmutablePureComponent {
|
|||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
noPadding
|
noPadding
|
||||||
>
|
>
|
||||||
<StatusReposts params={params} />
|
<WrappedBundle component={StatusReposts} componentParams={params} />
|
||||||
</ModalLayout>
|
</ModalLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user