@@ -3,7 +3,6 @@ import Back from "@components/Back/Back.astro";
33import RowCard from " @components/RowCard/RowCard.astro" ;
44import { getCollection } from " astro:content" ;
55import { default as Layout } from " src/layouts/Content/Content.astro" ;
6- import Pagination from " @components/Pagination/Pagination.astro" ;
76const evaluations = await getCollection (" evaluations" );
87
98const courseCodes = {
@@ -12,10 +11,7 @@ const courseCodes = {
1211
1312const comp2804Evaluations = evaluations
1413 .filter ((evaluation ) => evaluation .data .course === " comp2804" )
15- .sort ((a , b ) => Number (b .data .created_at ) - Number (a .data .created_at ))
16- .slice (0 , 8 );
17-
18- const numberOfPages = Math .ceil (comp2804Evaluations .length / 8 );
14+ .sort ((a , b ) => Number (b .data .created_at ) - Number (a .data .created_at ));
1915---
2016
2117<Layout title =" Evaluations" >
@@ -49,22 +45,6 @@ const numberOfPages = Math.ceil(comp2804Evaluations.length / 8);
4945 ))
5046 }
5147 </div >
52- <Pagination
53- pagination ={ {
54- pageNumber: 1 ,
55- totalPages: numberOfPages ,
56- hasPrev: false ,
57- prev: { url: " " },
58- hasNext: numberOfPages > 1 ,
59- next: { url: " /evaluations/2" },
60- first: { url: " /evaluations/1" },
61- last: { url: ` /evaluations/${numberOfPages } ` },
62- pagers: Array .from ({ length: numberOfPages }, (_ , i ) => ({
63- pageNumber: i + 1 ,
64- url: ` /evaluations/${i + 1 } ` ,
65- })),
66- }}
67- />
6848</Layout >
6949
7050<style >
0 commit comments