From 641226f1ca8b20f9e955efe633a94aa6864a7419 Mon Sep 17 00:00:00 2001 From: p-eye Date: Sun, 22 Dec 2024 01:10:51 +0900 Subject: [PATCH] refactor: use tab-indented JSON.stringify for readability in useDataSaver --- frontend/src/lib/hooks/useDataSaver.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/hooks/useDataSaver.ts b/frontend/src/lib/hooks/useDataSaver.ts index 9bcc10367..82798d158 100644 --- a/frontend/src/lib/hooks/useDataSaver.ts +++ b/frontend/src/lib/hooks/useDataSaver.ts @@ -7,7 +7,9 @@ const useDataSaver = ( const copyToClipboard = () => { if (navigator.clipboard) { const str = - typeof data === 'string' ? String(data) : JSON.stringify(data); + typeof data === 'string' + ? String(data) + : JSON.stringify(data, null, '\t'); navigator.clipboard.writeText(str); showSuccessAlert({ id: subject,