mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-12 07:12:52 +01:00
refactor: improve code quality
This commit is contained in:
@@ -4,9 +4,9 @@ interface Props {
|
||||
url?: string
|
||||
label?: string
|
||||
}
|
||||
const { badge, url, name } = Astro.props
|
||||
const { badge, url, label } = Astro.props
|
||||
---
|
||||
<a href={url} aria-label={name}>
|
||||
<a href={url} aria-label={label}>
|
||||
<button
|
||||
class:list={`
|
||||
w-full
|
||||
|
||||
@@ -59,7 +59,7 @@ const getPageUrl = (p: number) => {
|
||||
---
|
||||
|
||||
<div class:list={[className, "flex flex-row gap-3 justify-center"]} style={style}>
|
||||
<a href={url(page.url.prev)} aria-label={page.url.prev ? "Previous Page" : null}
|
||||
<a href={url(page.url.prev || "")} aria-label={page.url.prev ? "Previous Page" : null}
|
||||
class:list={["btn-card overflow-hidden rounded-lg text-[var(--primary)] w-11 h-11",
|
||||
{"disabled": page.url.prev == undefined}
|
||||
]}
|
||||
@@ -81,7 +81,7 @@ const getPageUrl = (p: number) => {
|
||||
>{p}</a>
|
||||
})}
|
||||
</div>
|
||||
<a href={url(page.url.next)} aria-label={page.url.next ? "Next Page" : null}
|
||||
<a href={url(page.url.next || "")} aria-label={page.url.next ? "Next Page" : null}
|
||||
class:list={["btn-card overflow-hidden rounded-lg text-[var(--primary)] w-11 h-11",
|
||||
{"disabled": page.url.next == undefined}
|
||||
]}
|
||||
|
||||
Reference in New Issue
Block a user