1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 15:19:06 +00:00

fix org public links (#6174)

* fix org public links

* remove notes

* frontend code optimize

---------

Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com>
Co-authored-by: r350178982 <32759763+r350178982@users.noreply.github.com>
This commit is contained in:
awu0403
2024-06-11 11:39:27 +08:00
committed by GitHub
parent f2311b93b9
commit 8121772f9f
2 changed files with 5 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ class OrgLinks extends React.Component {
}
listOrgLinks = (page) => {
seafileAPI.orgAdminListOrgLinks(this.state.page).then(res => {
seafileAPI.orgAdminListOrgLinks(page).then(res => {
const data = res.data;
this.setState({
linkList: data.link_list,
@@ -45,7 +45,7 @@ class OrgLinks extends React.Component {
onChangePageNum = (event, num) => {
event.preventDefault();
let page = this.state.page;
if (num == 1) {
if (num === 1) {
page = page + 1;
} else {
page = page - 1;
@@ -122,8 +122,8 @@ class OrgLinks extends React.Component {
</tbody>
</table>
<div className="paginator">
{this.state.page != 1 && <a href="#" onClick={(e) => this.onChangePageNum(e, -1)}>{gettext('Previous')}</a>}
{(this.state.page != 1 && this.state.pageNext) && <span> | </span>}
{this.state.page !== 1 && <a href="#" onClick={(e) => this.onChangePageNum(e, -1)}>{gettext('Previous')}</a>}
{(this.state.page !== 1 && this.state.pageNext) && <span> | </span>}
{this.state.pageNext && <a href="#" onClick={(e) => this.onChangePageNum(e, 1)}>{gettext('Next')}</a>}
</div>
</div>