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