diff --git a/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx b/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx index 8ec6d98..09f8ff1 100644 --- a/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx +++ b/src/pages/transaction/history-transaction/blocks/DetailTransaction.tsx @@ -747,7 +747,7 @@ const DetailTransaction = () => {
+ {(() => {
+ try {
+ if (log.response_code === null) {
+ return '';
+ }
+ const parsed = JSON.parse(log.request_body);
+ return JSON.stringify(parsed, null, 2);
+ } catch (e) {
+ return log.request_body; // fallback: tampilkan as-is jika gagal parse
+ }
+ })()}
+
+ {(() => {
+ try {
+ if (log.request_body === null) {
+ return '';
+ }
+ const parsed = JSON.parse(log.request_body);
+ return JSON.stringify(parsed, null, 2) ?? '';
+ } catch (e) {
+ return log.response_body ?? ''; // fallback: tampilkan as-is jika gagal parse
+ }
+ })()}
+
+
+ {(() => {
+ try {
+ if (log.response_code === null) {
+ return '';
+ }
+ const parsed = JSON.parse(log.request_body);
+ return JSON.stringify(parsed, null, 2);
+ } catch (e) {
+ return log.request_body; // fallback: tampilkan as-is jika gagal parse
+ }
+ })()}
+
+ {(() => {
+ try {
+ if (log.request_body === null) {
+ return '';
+ }
+ const parsed = JSON.parse(log.request_body);
+ return JSON.stringify(parsed, null, 2) ?? '';
+ } catch (e) {
+ return log.response_body ?? ''; // fallback: tampilkan as-is jika gagal parse
+ }
+ })()}
+
+