Skip to content

Commit 82e639b

Browse files
committed
wip: reviews
1 parent 5d8c17a commit 82e639b

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

src/components/options.tsx

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,23 @@ const JSONPanel: React.FC = () => {
4848
placeholder="Mode"
4949
/>
5050

51-
<div className="flex items-center gap-1.5">
52-
<Switch
53-
id="allowTrailingCommas"
54-
checked={allowTrailingCommas}
55-
onCheckedChange={(value: boolean) => {
56-
setJsonOptions({
57-
...jsonOptions,
58-
allowTrailingCommas: value,
59-
});
60-
}}
61-
/>
62-
<Label htmlFor="allowTrailingCommas">
63-
Allow Trailing Commas
64-
</Label>
65-
</div>
51+
{jsonMode === "jsonc" && (
52+
<div className="flex items-center gap-1.5">
53+
<Switch
54+
id="allowTrailingCommas"
55+
checked={allowTrailingCommas}
56+
onCheckedChange={(value: boolean) => {
57+
setJsonOptions({
58+
...jsonOptions,
59+
allowTrailingCommas: value,
60+
});
61+
}}
62+
/>
63+
<Label htmlFor="allowTrailingCommas">
64+
Allow Trailing Commas
65+
</Label>
66+
</div>
67+
)}
6668
</>
6769
);
6870
};

0 commit comments

Comments
 (0)