Skip to content

Commit 641226f

Browse files
committed
refactor: use tab-indented JSON.stringify for readability in useDataSaver
1 parent 7ec3884 commit 641226f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/src/lib/hooks/useDataSaver.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ const useDataSaver = (
77
const copyToClipboard = () => {
88
if (navigator.clipboard) {
99
const str =
10-
typeof data === 'string' ? String(data) : JSON.stringify(data);
10+
typeof data === 'string'
11+
? String(data)
12+
: JSON.stringify(data, null, '\t');
1113
navigator.clipboard.writeText(str);
1214
showSuccessAlert({
1315
id: subject,

0 commit comments

Comments
 (0)