@@ -9,6 +9,11 @@ interface Props {
9
9
}
10
10
11
11
const { page, style } = Astro .props
12
+ const baseUrl = import .meta .env .BASE_URL
13
+
14
+ const prevUrl = page .url .prev ?.replace (baseUrl , ' ' )
15
+ const nextUrl = page .url .next ?.replace (baseUrl , ' ' )
16
+
12
17
13
18
const HIDDEN = - 1
14
19
@@ -50,10 +55,11 @@ const getPageUrl = (p: number) => {
50
55
}
51
56
---
52
57
58
+
53
59
<div class:list ={ [className , " flex flex-row gap-3 justify-center" ]} style ={ style } >
54
- <a href ={ url (page . url . prev || " " )} aria-label ={ page . url . prev ? " Previous Page" : null }
60
+ <a href ={ url (prevUrl || " " )} aria-label ={ prevUrl ? " Previous Page" : null }
55
61
class:list ={ [" btn-card overflow-hidden rounded-lg text-[var(--primary)] w-11 h-11" ,
56
- {" disabled" : page . url . prev == undefined }
62
+ {" disabled" : prevUrl == undefined }
57
63
]}
58
64
>
59
65
<Icon name =" material-symbols:chevron-left-rounded" class =" text-[1.75rem]" ></Icon >
@@ -73,9 +79,9 @@ const getPageUrl = (p: number) => {
73
79
>{ p } </a >
74
80
})}
75
81
</div >
76
- <a href ={ url (page . url . next || " " )} aria-label ={ page . url . next ? " Next Page" : null }
82
+ <a href ={ url (nextUrl || " " )} aria-label ={ nextUrl ? " Next Page" : null }
77
83
class:list ={ [" btn-card overflow-hidden rounded-lg text-[var(--primary)] w-11 h-11" ,
78
- {" disabled" : page . url . next == undefined }
84
+ {" disabled" : nextUrl == undefined }
79
85
]}
80
86
>
81
87
<Icon name =" material-symbols:chevron-right-rounded" class =" text-[1.75rem]" ></Icon >
0 commit comments