Skip to content

Commit

Permalink
Corregidos bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Carpio committed Mar 7, 2021
1 parent 86ae0cb commit 2157b0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion etsii_agenda/src/components/mainComponents/EventList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class EventList extends React.Component<IEventListProps, IEventListState>{
public render() {
return (
<>
<Pagination pageNumber={this.state.pageNumber} changePageNumber={this.changePageNumber}/>
<Pagination pageNumber={this.state.pageNumber} changePageNumber={this.changePageNumber} eventCount={this.state.eventList.length}/>
<Buscador textSearch={this.state.textSearch} changeTextSearch={this.changeTextSearch} />

{ this.state.textSearch === '' ?
Expand Down
5 changes: 3 additions & 2 deletions etsii_agenda/src/components/mainComponents/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';

interface IPaginationProps {
pageNumber: number,
eventCount: number,
changePageNumber: (number:number) => void
}
interface IPaginationState { }
Expand All @@ -15,8 +16,8 @@ class Pagination extends React.Component<IPaginationProps, IPaginationState>{
<div className="ic-header-container">
<h1 className="ic-header-title">Eventos pasados</h1>
<div className="ic-header-subtitle">
<span className="ic-subtitle-string">Hay 476 eventos pasados</span>
<span className="ic-subtitle-pages"> - Página {this.props.pageNumber + 1} / 96</span>
<span className="ic-subtitle-string">Hay {this.props.eventCount} eventos pasados</span>
<span className="ic-subtitle-pages"> - Página {this.props.pageNumber + 1} / {Math.ceil(this.props.eventCount/5)}</span>
</div>
</div>
<br />
Expand Down

0 comments on commit 2157b0f

Please sign in to comment.