Fix pet sorting
This commit is contained in:
@@ -30,7 +30,7 @@ export default function AdoptPage() {
|
|||||||
const params = new URLSearchParams({
|
const params = new URLSearchParams({
|
||||||
page: String(page),
|
page: String(page),
|
||||||
size: String(PAGE_SIZE),
|
size: String(PAGE_SIZE),
|
||||||
sort: "petId,asc",
|
sort: "id,asc",
|
||||||
status: "Available",
|
status: "Available",
|
||||||
});
|
});
|
||||||
if (query) {
|
if (query) {
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ function AppointmentsPage() {
|
|||||||
.then((data) => setServices(data.content ?? []))
|
.then((data) => setServices(data.content ?? []))
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|
||||||
fetch(`${API_BASE}/api/v1/pets?size=200&sort=petId,asc`)
|
fetch(`${API_BASE}/api/v1/pets?size=200&sort=id,asc&status=Available`)
|
||||||
.then((r) => r.json())
|
.then((r) => r.json())
|
||||||
.then((data) => setAllPets(data.content ?? []))
|
.then((data) => setAllPets(data.content ?? []))
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|||||||
Reference in New Issue
Block a user