Moving all links and redirects to react-router
Этот коммит содержится в:
@@ -63,8 +63,8 @@ export default class AdminNavbarDropdown extends React.Component {
|
||||
role='menu'
|
||||
>
|
||||
<li>
|
||||
<a
|
||||
href={Utils.getWindowLocationOrigin() + '/' + this.state.currentTeam.name}
|
||||
<Link
|
||||
to={Utils.getWindowLocationOrigin() + '/' + this.state.currentTeam.name}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='admin.nav.switch'
|
||||
@@ -73,7 +73,7 @@ export default class AdminNavbarDropdown extends React.Component {
|
||||
display_name: this.state.currentTeam.display_name
|
||||
}}
|
||||
/>
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link to={Utils.getTeamURLFromAddressBar() + '/logout'}>
|
||||
@@ -83,29 +83,6 @@ export default class AdminNavbarDropdown extends React.Component {
|
||||
/>
|
||||
</Link>
|
||||
</li>
|
||||
<li className='divider'></li>
|
||||
<li>
|
||||
<a
|
||||
target='_blank'
|
||||
href='/static/help/help.html'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='admin.nav.help'
|
||||
defaultMessage='Help'
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
target='_blank'
|
||||
href='/static/help/report_problem.html'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='admin.nav.report'
|
||||
defaultMessage='Report a Problem'
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -10,6 +10,7 @@ import TeamStore from 'stores/team_store.jsx';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
import React from 'react';
|
||||
import {browserHistory} from 'react-router';
|
||||
|
||||
export default class UserItem extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -158,9 +159,9 @@ export default class UserItem extends React.Component {
|
||||
|
||||
const teamUrl = TeamStore.getCurrentTeamUrl();
|
||||
if (teamUrl) {
|
||||
window.location.href = teamUrl;
|
||||
browserHistory.push(teamUrl);
|
||||
} else {
|
||||
window.location.href = '/';
|
||||
browserHistory.push('/');
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
|
||||
Ссылка в новой задаче
Block a user