fix(pagination): read pagination from meta instead of page
backend جدید clinicpro صفحهبندی را در پاسخ تحت کلید meta برمیگرداند
({totalRecords, totalPages, currentPage})، نه page. به همین دلیل
PaginationContent مقدار totalRecords نمیگرفت و count=NaN میشد و
صفحهبندی مخفی میماند. اصلاح در صفحات /doctors و /clinics.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import cities from "@/data/city.json";
|
||||
|
||||
function DoctorsPage({ matchedCity, matchedState, list }) {
|
||||
const searchParams = useSearchParams();
|
||||
const [page, setPage] = useState(list?.page?.currentPage);
|
||||
const [page, setPage] = useState(list?.meta?.currentPage || 1);
|
||||
const [doctors, setDoctors] = useState(list?.data);
|
||||
const fieldName = searchParams.get("specialty");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user