Skip to content

Commit 2e5007e

Browse files
committed
fix: default json spacing
1 parent 6163301 commit 2e5007e

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

src/store/useFile.ts

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,41 @@ import { contentToJson, jsonToContent } from "../lib/utils/jsonAdapter";
99
import useConfig from "./useConfig";
1010
import useJson from "./useJson";
1111

12-
const defaultJson = JSON.stringify({
13-
fruits: [
14-
{
15-
name: "Apple",
16-
color: "Red",
17-
nutrients: {
18-
calories: 52,
19-
fiber: "2.4g",
20-
vitaminC: "4.6mg",
12+
const defaultJson = JSON.stringify(
13+
{
14+
fruits: [
15+
{
16+
name: "Apple",
17+
color: "Red",
18+
nutrients: {
19+
calories: 52,
20+
fiber: "2.4g",
21+
vitaminC: "4.6mg",
22+
},
2123
},
22-
},
23-
{
24-
name: "Banana",
25-
color: "Yellow",
26-
nutrients: {
27-
calories: 89,
28-
fiber: "2.6g",
29-
potassium: "358mg",
24+
{
25+
name: "Banana",
26+
color: "Yellow",
27+
nutrients: {
28+
calories: 89,
29+
fiber: "2.6g",
30+
potassium: "358mg",
31+
},
3032
},
31-
},
32-
{
33-
name: "Orange",
34-
color: "Orange",
35-
nutrients: {
36-
calories: 47,
37-
fiber: "2.4g",
38-
vitaminC: "53.2mg",
33+
{
34+
name: "Orange",
35+
color: "Orange",
36+
nutrients: {
37+
calories: 47,
38+
fiber: "2.4g",
39+
vitaminC: "53.2mg",
40+
},
3941
},
40-
},
41-
null,
42-
2,
43-
],
44-
});
42+
],
43+
},
44+
null,
45+
2
46+
);
4547

4648
type SetContents = {
4749
contents?: string;

0 commit comments

Comments
 (0)