Skip to content

Commit cecb6e1

Browse files
committed
fix: page size camera, alerts
1 parent a3b6cea commit cecb6e1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

client/my-app/src/components/features/alerts/AlertTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export default function AlertTable({ alerts }: { alerts: Alert[] }) {
220220
useEffect(() => setRows(alerts), [alerts]);
221221

222222
// ⬇️ NEW: Pagination state
223-
const PAGE_SIZE = 25;
223+
const PAGE_SIZE = 10;
224224
const [page, setPage] = useState(1);
225225

226226
// ให้กลับไปหน้า 1 เมื่อมีการเปลี่ยนแปลงข้อมูล/เรียงลำดับ

client/my-app/src/components/features/cameras/CameraGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function parseStatusParam(v: string | null): boolean | null {
1818
export default function CameraGrid({ cameras }: { cameras: Camera[] }) {
1919
const params = useSearchParams();
2020
const want = parseStatusParam(params.get("status"));
21-
const PAGE_SIZE = 12;
21+
const PAGE_SIZE = 8;
2222

2323
const filtered = useMemo(() => {
2424
if (want === null) return cameras;

client/my-app/src/components/features/cameras/CameraTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default function CameraTable({
230230

231231
// --- เพิ่ม state + ค่าคงที่ด้านบนของ component ---
232232
const [page, setPage] = useState(1);
233-
const PAGE_SIZE = 25;
233+
const PAGE_SIZE = 10;
234234

235235
// รีเซ็ตหน้าเมื่อ filter/sort เปลี่ยน
236236
useEffect(() => {

0 commit comments

Comments
 (0)