mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
[favorites] rewrote it with React (#2417)
This commit is contained in:
@@ -3,7 +3,7 @@ import { Link } from '@reach/router';
|
||||
import { gettext, siteRoot } from './constants';
|
||||
import { seafileAPI } from '../utils/seafile-api';
|
||||
|
||||
class MainSideNav extends React.Component {
|
||||
class MainSideNav extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
let currentTab = this.props.currentTab || '';
|
||||
@@ -146,8 +146,8 @@ class MainSideNav extends React.Component {
|
||||
|
||||
<h3 className="sf-heading">Tools</h3>
|
||||
<ul className="side-tabnav-tabs">
|
||||
<li className={`tab ${this.state.currentTab === 'favorites' ? 'tab-cur' : ''}`}>
|
||||
<a href={siteRoot + '#starred/'} title={gettext('Favorites')} onClick={() => this.tabItemClick('favorites')}>
|
||||
<li className={`tab ${this.state.currentTab === 'starred' ? 'tab-cur' : ''}`}>
|
||||
<a href={siteRoot + 'starred/'} title={gettext('Favorites')} onClick={() => this.tabItemClick('favorites')}>
|
||||
<span className="sf2-icon-star" aria-hidden="true"></span>
|
||||
{gettext('Favorites')}
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user