Răsfoiți Sursa

GC-995 Working

Seiya Tashiro 7 ani în urmă
părinte
comite
07ce94265d
1 a modificat fișierele cu 36 adăugiri și 0 ștergeri
  1. 36 0
      src/client/js/components/RecentCreated/RecentCreated.js

+ 36 - 0
src/client/js/components/RecentCreated/RecentCreated.js

@@ -46,11 +46,47 @@ export default class RecentCreated extends React.Component {
     let active = this.state.active;
     let active = this.state.active;
     let items = [];
     let items = [];
     console.log(this.state);
     console.log(this.state);
+// TODO GC-995 Start
+    if (1 === active) {
+      items.push(
+        <Pagination.First disabled />
+      );
+      items.push(
+        <Pagination.Prev disabled />
+      );
+    }
+    else {
+      items.push(
+        <Pagination.First />
+      );
+      items.push(
+        <Pagination.Prev />
+      );
+    }
+// TODO GC-995 End
     for (let number = 1; number <= 5; number++) {
     for (let number = 1; number <= 5; number++) {
       items.push(
       items.push(
         <Pagination.Item key={number} active={number === active} onClick={ () => this.getRecentCreatedList(number)}>{number}</Pagination.Item>
         <Pagination.Item key={number} active={number === active} onClick={ () => this.getRecentCreatedList(number)}>{number}</Pagination.Item>
       );
       );
     }
     }
+// TODO GC-995 Start
+    if (5 === active) {
+      items.push(
+        <Pagination.Next disabled />
+      );
+      items.push(
+        <Pagination.Last disabled />
+      );
+    }
+    else {
+      items.push(
+        <Pagination.Next />
+      );
+      items.push(
+        <Pagination.Last />
+      );
+    }
+// TODO GC-995 End
     return (
     return (
       <div className="page-list-container-create">
       <div className="page-list-container-create">
         <ul className="page-list-ul page-list-ul-flat">
         <ul className="page-list-ul page-list-ul-flat">