File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { ISnap } from "../../types";
44import SnapNameEntry from "./SnapNameEntry" ;
55import NewSnapNotification from "../NewSnapNotification" ;
66import EmptySnapList from "../EmptySnapList" ;
7- import { PAGE_NUMBER } from "../../types /constants" ;
7+ import { ITEMS_PER_PAGE } from "../../constants" ;
88
99function PublishedSnapList ( {
1010 snaps,
@@ -115,7 +115,7 @@ function PublishedSnapList({
115115 />
116116 < Pagination
117117 currentPage = { currentPage }
118- itemsPerPage = { PAGE_NUMBER }
118+ itemsPerPage = { ITEMS_PER_PAGE }
119119 paginate = { ( page ) => setCurrentPage ( page ) }
120120 totalItems = { totalItems }
121121 />
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { Accordion } from "@canonical/react-components";
33import { ISnap } from "../../types" ;
44import PublishedSnapList from "../PublishedSnapList" ;
55import PublisherMetrics from "../PublisherMetrics" ;
6- import { PAGE_NUMBER } from "../../types /constants" ;
6+ import { ITEMS_PER_PAGE } from "../../constants" ;
77
88function PublishedSnapSection ( {
99 snaps,
@@ -14,10 +14,10 @@ function PublishedSnapSection({
1414} ) {
1515 const [ currentPage , setCurrentPage ] = useState < number > ( 1 ) ;
1616
17- const firstItemOfPage = ( currentPage - 1 ) * PAGE_NUMBER ;
17+ const firstItemOfPage = ( currentPage - 1 ) * ITEMS_PER_PAGE ;
1818 const snapsInPage = snaps . slice (
1919 firstItemOfPage ,
20- firstItemOfPage + PAGE_NUMBER ,
20+ firstItemOfPage + ITEMS_PER_PAGE ,
2121 ) ;
2222
2323 return (
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
1010} from "@canonical/react-components" ;
1111
1212import { ISnap } from "../../types" ;
13- import { PAGE_NUMBER } from "../../types /constants" ;
13+ import { ITEMS_PER_PAGE } from "../../constants" ;
1414
1515function RegisteredSnaps ( {
1616 snaps,
@@ -168,7 +168,7 @@ function RegisteredSnaps({
168168 {
169169 key : "registered-snap-names" ,
170170 title : `Registered snap names (${ snaps . length } )` ,
171- content : < MainTable rows = { getData ( ) } paginate = { PAGE_NUMBER } /> ,
171+ content : < MainTable rows = { getData ( ) } paginate = { ITEMS_PER_PAGE } /> ,
172172 } ,
173173 ] }
174174 expanded = "registered-snap-names"
Original file line number Diff line number Diff line change 1+ export const ITEMS_PER_PAGE = 10 ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,18 +4,6 @@ export type RouteParams = {
44
55export type Status = "Pending" | "Expired" | "Revoked" ;
66
7- // Slices
8- export type CurrentStoreSlice = {
9- currentStore : {
10- currentStore : {
11- id : string ;
12- "manual-review-policy" : string ;
13- private : boolean ;
14- name : string ;
15- } ;
16- } ;
17- } ;
18-
197// Item lists
208export type InvitesList = Array < Invite > ;
219export type MembersList = Array < Member > ;
You can’t perform that action at this time.
0 commit comments