Raw
1 "use client"
2
3 import React from "react"
4 import { usePagination } from "../../providers/Pagination"
5 import clsx from "clsx"
6 import { PaginationCard } from "./Card"
7
8 export const Pagination = () => {
9 const { previousPage, nextPage } = usePagination()
10
11 return (
12 <div
13 className={clsx(
14 "flex justify-between",
15 "flex-col sm:flex-row gap-docs_0.75"
16 )}
17 >
18 {previousPage && (
19 <PaginationCard
20 type="previous"
21 title={previousPage.title}
22 parentTitle={previousPage.parentTitle}
23 link={previousPage.link}
24 />
25 )}
26 {nextPage && (
27 <PaginationCard
28 type="next"
29 title={nextPage.title}
30 parentTitle={nextPage.parentTitle}
31 link={nextPage.link}
32 />
33 )}
34 </div>
35 )
36 }