fix user pagination bug

This commit is contained in:
Erikas 2024-07-12 17:15:01 +03:00
parent 5106cf43ec
commit e3e3ecb5d3

View File

@ -19,17 +19,16 @@
{{- end -}}
</div>
<div class="d-flex justify-content-center mt-2">
<ul class="pagination">
<li class="page-item {{if le .page 1}}disabled{{end}}">
<a class="page-link" href="{{if gt .page 1}}/benchmarks?page={{ .prevPage }}&query={{ .query }}{{else}}#{{end}}">Previous</a>
<a class="page-link" href="{{if gt .page 1}}/user/{{ .user.ID }}?page={{ .prevPage }}{{else}}#{{end}}">Previous</a>
</li>
<li class="page-item disabled">
<a class="page-link" href="/benchmarks?page={{ .page }}&query={{ .query }}">{{ .page }}</a>
<a class="page-link" href="/user/{{ .user.ID }}?page={{ .page }}">{{ .page }}</a>
</li>
<li class="page-item {{if ge .page .totalPages}}disabled{{end}}">
<a class="page-link" href="{{if lt .page .totalPages}}/benchmarks?page={{ .nextPage }}&query={{ .query }}{{else}}#{{end}}">Next</a>
<a class="page-link" href="{{if lt .page .totalPages}}/user/{{ .user.ID }}?page={{ .nextPage }}{{else}}#{{end}}">Next</a>
</li>
</ul>
</div>