From 130c69eeded403c20dc2c44ca97b248fa3cc959b Mon Sep 17 00:00:00 2001 From: Mahen Date: Tue, 19 May 2026 19:48:43 +0700 Subject: [PATCH] fix: add debugger review path --- src/hooks/useReviewTable.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/hooks/useReviewTable.ts b/src/hooks/useReviewTable.ts index 7443af8..a00c7d5 100644 --- a/src/hooks/useReviewTable.ts +++ b/src/hooks/useReviewTable.ts @@ -15,10 +15,19 @@ export const useReviewTable = ( const getReviewData = async () => { try { setIsLoading(true); - console.log(reviewPath); + // 1. CEK URL SEBELUM FETCH: Pastikan tidak ada kata "undefined" di console browser + console.log("Menembak ke URL:", reviewPath); + const req = await fetch(reviewPath); + + // 2. CEK STATUS HTTP: Pastikan statusnya 200 OK, bukan 404 atau 500 + console.log("HTTP Status:", req.status); + const res: ApiResponse = await req.json(); + // 3. CEK STRUKTUR PAYLOAD: Lihat isi JSON asli dari FastAPI di deploy mode + console.log("Raw Response dari Backend:", res); + if (res.data && Array.isArray(res.data)) { setData(res.data); } else {