Commit 75ceb4fe authored by Stefan Probst's avatar Stefan Probst
Browse files

fix: use total search results count

parent 546f0256
......@@ -254,6 +254,7 @@ function ItemMedia({ properties }: { properties: ItemProperties }) {
</div>
<div className="flex justify-center border border-gray-200">
<button
aria-label="Previous image"
className={cx(
'inline-flex items-center justify-center px-6',
media.length === 1
......@@ -265,7 +266,12 @@ function ItemMedia({ properties }: { properties: ItemProperties }) {
setIndex((index) => (index > 0 ? index - 1 : media.length - 1))
}}
>
<svg viewBox="0 0 7.599 14.043" fill={'currentColor'} height="0.8em">
<svg
aria-hidden
viewBox="0 0 7.599 14.043"
fill={'currentColor'}
height="0.8em"
>
<g transform="translate(7.599) rotate(90)">
<path
className="a"
......@@ -283,6 +289,7 @@ function ItemMedia({ properties }: { properties: ItemProperties }) {
))}
</ul>
<button
aria-label="Next image"
className={cx(
'inline-flex items-center justify-center px-6',
media.length === 1
......@@ -294,7 +301,12 @@ function ItemMedia({ properties }: { properties: ItemProperties }) {
setIndex((index) => (index >= media.length - 1 ? 0 : index + 1))
}}
>
<svg viewBox="0 0 7.599 14.043" fill={'currentColor'} height="0.8em">
<svg
aria-hidden
viewBox="0 0 7.599 14.043"
fill={'currentColor'}
height="0.8em"
>
<g transform="translate(0 14.043) rotate(-90)">
<path d="M14.043,0H0L6.931,7.6Z" transform="translate(0 0)" />
</g>
......
......@@ -93,8 +93,8 @@ export default function SearchScreen(): JSX.Element {
<div className="px-6 pb-12">
<Title className="space-x-3">
<span>Search results</span>
{Number(results?.count) > 0 ? (
<span className="text-2xl font-normal">({results?.count})</span>
{Number(results?.hits) > 0 ? (
<span className="text-2xl font-normal">({results?.hits})</span>
) : null}
{isFetching ? (
<span>
......@@ -362,7 +362,7 @@ function ItemSearchLongPagination({
passHref
shallow={true}
>
<Anchor>{num}</Anchor>
<Anchor aria-label={`Page ${num}`}>{num}</Anchor>
</Link>
</li>
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment