Skip to content

Commit 8ef7094

Browse files
committed
got rid of pagination
1 parent 88a4646 commit 8ef7094

File tree

5 files changed

+1
-233
lines changed

5 files changed

+1
-233
lines changed

src/components/Pagination/Pagination.astro

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/components/Pagination/Pagination.scss

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/content/questions/comp2804/2019-fall-final/9/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ solution: comp2804/2019-fall-final/9/solution.md
88
tags:
99
- comp2804
1010
- comp2804-final
11-
- comp2804-a-recursively-defined-set-(4.3)
1211
---

src/pages/evaluations.astro

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import Back from "@components/Back/Back.astro";
33
import RowCard from "@components/RowCard/RowCard.astro";
44
import { getCollection } from "astro:content";
55
import { default as Layout } from "src/layouts/Content/Content.astro";
6-
import Pagination from "@components/Pagination/Pagination.astro";
76
const evaluations = await getCollection("evaluations");
87
98
const courseCodes = {
@@ -12,10 +11,7 @@ const courseCodes = {
1211
1312
const 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>

src/pages/evaluations/[page].astro

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)