Skip to content

Commit

Permalink
fix: json copy format
Browse files Browse the repository at this point in the history
  • Loading branch information
Morta1 committed Oct 17, 2024
1 parent 6bbf7bf commit de44eaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/data.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import IconButton from '@mui/material/IconButton';
import Box from '@mui/material/Box';
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
import Popper from '@components/common/Popper';
import { isProd } from '@utility/helpers';
import { isProd, tryToParse } from '@utility/helpers';
import { Adsense } from '@ctrl/react-adsense';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import { useTheme } from '@emotion/react';
Expand Down Expand Up @@ -73,7 +73,7 @@ const Data = () => {
const handleCopyITRaw = async (e) => {
try {
setAnchorEl(e.currentTarget)
await navigator.clipboard.writeText(localStorage.getItem('rawJson'));
await navigator.clipboard.writeText(JSON.stringify(tryToParse(localStorage.getItem('rawJson')), null, 2));
} catch (err) {
console.error(err);
}
Expand Down

0 comments on commit de44eaa

Please sign in to comment.