Make avatar in compose box navigate to profile page
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
e652de227c
commit
8f6bd69f11
3 changed files with 11 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import StatusListContainer from '../../ui/containers/status_list_container';
|
||||
|
@ -80,13 +81,15 @@ class GroupTimeline extends React.PureComponent {
|
|||
);
|
||||
}
|
||||
|
||||
const acct = account.get('acct');
|
||||
|
||||
return (
|
||||
<div>
|
||||
{relationships.get('member') && (
|
||||
<div className='timeline-compose-block'>
|
||||
<div className='timeline-compose-block__avatar'>
|
||||
<NavLink className='timeline-compose-block__avatar' to={`/@${acct}`}>
|
||||
<Avatar account={account} size={46} />
|
||||
</div>
|
||||
</NavLink>
|
||||
<ComposeFormContainer group={group} shouldCondense autoFocus={false} />
|
||||
</div>
|
||||
)}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import ComposeFormContainer from '../features/compose/containers/compose_form_container';
|
||||
import Avatar from '../components/avatar';
|
||||
|
@ -46,6 +47,8 @@ class HomePage extends ImmutablePureComponent {
|
|||
render() {
|
||||
const { me, children, account, showFundingPanel, showCryptoDonatePanel, cryptoLimit, showTrendsPanel, showWhoToFollowPanel } = this.props;
|
||||
|
||||
const acct = account.get('acct');
|
||||
|
||||
return (
|
||||
<div className='page'>
|
||||
<div className='page__columns'>
|
||||
|
@ -62,9 +65,9 @@ class HomePage extends ImmutablePureComponent {
|
|||
<div className='columns-area__panels__main'>
|
||||
<div className='columns-area columns-area--mobile'>
|
||||
{me && <div className='timeline-compose-block' ref={this.composeBlock}>
|
||||
<div className='timeline-compose-block__avatar'>
|
||||
<NavLink className='timeline-compose-block__avatar' to={`/@${acct}`}>
|
||||
<Avatar account={account} size={46} />
|
||||
</div>
|
||||
</NavLink>
|
||||
<ComposeFormContainer
|
||||
shouldCondense
|
||||
autoFocus={false}
|
||||
|
|
|
@ -179,6 +179,7 @@
|
|||
}
|
||||
|
||||
&__avatar {
|
||||
display: block;
|
||||
@media (max-width: 405px) { display: none; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue