Admin: async components
This commit is contained in:
parent
aa54e0bd0b
commit
1e77adda34
2 changed files with 19 additions and 4 deletions
|
@ -330,6 +330,14 @@ export function InstanceModerationPanel() {
|
|||
return import(/* webpackChunkName: "features/remote_timeline" */'../components/profile_media_panel');
|
||||
}
|
||||
|
||||
export function LatestAccountsPanel() {
|
||||
return import(/* webpackChunkName: "features/admin" */'../../admin/components/latest_accounts_panel');
|
||||
}
|
||||
|
||||
export function AdminNav() {
|
||||
return import(/* webpackChunkName: "features/admin" */'../../admin/components/admin_nav');
|
||||
}
|
||||
|
||||
export function CryptoDonate() {
|
||||
return import(/* webpackChunkName: "features/crypto_donate" */'../../crypto_donate');
|
||||
}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
import React from 'react';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import LinkFooter from '../features/ui/components/link_footer';
|
||||
import AdminNav from 'soapbox/features/admin/components/admin_nav';
|
||||
import LatestAccountsPanel from 'soapbox/features/admin/components/latest_accounts_panel';
|
||||
import BundleContainer from 'soapbox/features/ui/containers/bundle_container';
|
||||
import {
|
||||
AdminNav,
|
||||
LatestAccountsPanel,
|
||||
} from 'soapbox/features/ui/util/async-components';
|
||||
|
||||
export default
|
||||
class AdminPage extends ImmutablePureComponent {
|
||||
|
@ -17,7 +20,9 @@ class AdminPage extends ImmutablePureComponent {
|
|||
|
||||
<div className='columns-area__panels__pane columns-area__panels__pane--left'>
|
||||
<div className='columns-area__panels__pane__inner'>
|
||||
<AdminNav />
|
||||
<BundleContainer fetchComponent={AdminNav}>
|
||||
{Component => <Component />}
|
||||
</BundleContainer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -29,7 +34,9 @@ class AdminPage extends ImmutablePureComponent {
|
|||
|
||||
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
|
||||
<div className='columns-area__panels__pane__inner'>
|
||||
<LatestAccountsPanel limit={5} />
|
||||
<BundleContainer fetchComponent={LatestAccountsPanel}>
|
||||
{Component => <Component limit={5} />}
|
||||
</BundleContainer>
|
||||
<LinkFooter />
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue