File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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} ;
You can’t perform that action at this time.
0 commit comments