Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieroberto committed Sep 20, 2024
1 parent 51dd235 commit 53815e3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/components/pagination/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ the numbered variant only, and including an arrow pointing left or right. #}
{%- macro _arrowLink(link, type = "next") %}
{% set arrowType = arrowPrevious if type == "prev" else arrowNext %}
<div class="nhsuk-pagination--numbered__{{ type }}">
<a class="nhsuk-pagination--numbered__link" href="{{ link.href }}" rel="{{ type }}"
{{- nhsukAttributes(link.attributes) }}>
<a class="nhsuk-pagination--numbered__link" href="{{ link }}" rel="{{ type }}">
{%- if type == "prev" -%}
{{ _arrowPrevious() }}
{%- endif -%}
Expand All @@ -62,7 +61,7 @@ the numbered variant only, and including an arrow pointing left or right. #}
{%- if numbered %}

{% if params.previousUrl %}
{% call _arrowLink(previous, "prev") -%}
{% call _arrowLink(params.previousUrl, "prev") -%}
Previous<span class="nhsuk-u-visually-hidden"> page</span>
{% endcall %}
{% endif %}
Expand All @@ -74,7 +73,7 @@ the numbered variant only, and including an arrow pointing left or right. #}
</ul>

{% if params.nextUrl %}
{% call _arrowLink(previous, "next") -%}
{% call _arrowLink(params.nextUrl, "next") -%}
Next<span class="nhsuk-u-visually-hidden"> page</span>
{%- endcall %}
{% endif %}
Expand Down

0 comments on commit 53815e3

Please sign in to comment.