Large update for all components

reorganization, linting, updating file imports, consolidation
warning: there will be errors in this commit
todo: update webpack, add missing styles, scss files, consolidate the rest of components within features/*
This commit is contained in:
mgabdev
2019-08-07 01:02:36 -04:00
parent 5505f60119
commit 280dc51d85
341 changed files with 8876 additions and 8321 deletions

View File

@@ -1,16 +1,11 @@
import { Fragment } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { fetchAccount, fetchAccountByUsername } from '../actions/accounts';
import { List as ImmutableList } from 'immutable';
import ImmutablePureComponent from 'react-immutable-pure-component';
import HeaderContainer from '../features/account_timeline/containers/header_container';
import { NavLink } from 'react-router-dom';
import WhoToFollowPanel from '../features/ui/components/who_to_follow_panel';
// import TrendsPanel from '../features/ui/components/trends_panel';
import LinkFooter from '../features/ui/components/link_footer';
import SignUpPanel from '../features/ui/components/sign_up_panel';
import ProfileInfoPanel from '../features/ui/components/profile_info_panel';
const emptyList = ImmutableList();
import {WhoToFollowPanel, SignUpPanel} from '../components/panel';
import LinkFooter from '../components/link_footer';
import ProfileInfoPanel from '../features/account_timeline/components/profile_info_panel';
import ColumnsArea from '../components/columns_area';
const mapStateToProps = (state, { params: { username }, withReplies = false }) => {
const accounts = state.getIn(['accounts']);
@@ -42,45 +37,29 @@ class ProfilePage extends ImmutablePureComponent {
static propTypes = {
account: ImmutablePropTypes.map,
accountUsername: PropTypes.string.isRequired,
accountId: PropTypes.number.isRequired,
children: PropTypes.node,
};
render () {
const {children, accountId, account, accountUsername} = this.props;
const {accountId, account, accountUsername} = this.props;
return (
<div className='page'>
<div className='page__top'>
<HeaderContainer accountId={accountId} username={accountUsername}/>
</div>
<div className='page__columns'>
<div className='columns-area__panels'>
<div className='columns-area__panels__pane columns-area__panels__pane--left'>
<div className='columns-area__panels__pane__inner'>
<ProfileInfoPanel username={accountUsername} account={account} />
</div>
</div>
<div className='columns-area__panels__main'>
<div className='columns-area columns-area--mobile'>
{children}
</div>
</div>
<div className='columns-area__panels__pane columns-area__panels__pane--right'>
<div className='columns-area__panels__pane__inner'>
<SignUpPanel />
<WhoToFollowPanel />
{/* <TrendsPanel /> */}
<LinkFooter />
</div>
</div>
</div>
</div>
</div>
<ColumnsArea
layout={{
top: <HeaderContainer accountId={accountId} username={accountUsername} />,
right: (
<Fragment>
<SignUpPanel />
<WhoToFollowPanel />
<LinkFooter />
</Fragment>
),
left: <ProfileInfoPanel username={accountUsername} account={account} />,
}}
>
{this.props.children}
</ColumnsArea>
)
}
}
}