1
-
2
1
import { LuExternalLink as ExternalLink } from "react-icons/lu" ;
3
2
4
3
import generalSettings , {
@@ -77,10 +76,6 @@ export default function GeneralSettings({
77
76
return ;
78
77
}
79
78
80
- console . log (
81
- draft . generalSettings [ settingsKey ] [ subSettingsKey ] ,
82
- ) ;
83
-
84
79
( draft . generalSettings [ settingsKey ] [
85
80
subSettingsKey
86
81
] as boolean ) = checked ;
@@ -97,7 +92,6 @@ export default function GeneralSettings({
97
92
</ div >
98
93
< Separator />
99
94
< SettingGroup
100
- key = { isAllSettingsEnabled . toString ( ) }
101
95
settings = { queryBoxSelectors }
102
96
settingStoreKey = "queryBoxSelectors"
103
97
/>
@@ -107,19 +101,14 @@ export default function GeneralSettings({
107
101
QoL tweaks
108
102
</ div >
109
103
< Separator />
110
- < SettingGroup
111
- key = { isAllSettingsEnabled . toString ( ) }
112
- settings = { qolTweaks }
113
- settingStoreKey = "qolTweaks"
114
- />
104
+ < SettingGroup settings = { qolTweaks } settingStoreKey = "qolTweaks" />
115
105
</ div >
116
106
< div className = "tw-flex tw-flex-col tw-gap-2" >
117
107
< div className = "tw-text-lg tw-font-semibold tw-tracking-tight" >
118
108
Visual tweaks
119
109
</ div >
120
110
< Separator />
121
111
< SettingGroup
122
- key = { isAllSettingsEnabled . toString ( ) }
123
112
settings = { visualTweaks }
124
113
settingStoreKey = "visualTweaks"
125
114
/>
@@ -165,7 +154,7 @@ function SettingGroup<
165
154
versionRelease,
166
155
onClick,
167
156
} ) => {
168
- const defaultChecked = Boolean (
157
+ const enabled = Boolean (
169
158
userSettings [ settingStoreKey ] ?. [
170
159
settingKey as keyof CplxUserSettings [ "generalSettings" ] [ K ]
171
160
] ,
@@ -212,8 +201,8 @@ function SettingGroup<
212
201
) }
213
202
</ div >
214
203
}
215
- defaultChecked = { ! settingKey ? true : defaultChecked }
216
- checked = { ! settingKey ? true : undefined }
204
+ defaultChecked = { ! settingKey ? true : enabled }
205
+ checked = { ! settingKey ? true : enabled }
217
206
onCheckedChange = { ( { checked } ) => {
218
207
if ( ! settingKey ) return onClick ?.( ) ;
219
208
updateSettings ( settingStoreKey , ( draft ) => {
0 commit comments