File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,10 +101,7 @@ function FeatureRow({
101101 </ td >
102102 < td class = "feature-switch-cell" >
103103 < Switch
104- checked = {
105- ( feature . localOverride === null && feature . isEnabled ) ||
106- feature . localOverride === true
107- }
104+ checked = { feature . localOverride ?? feature . isEnabled }
108105 tabIndex = { index + 1 }
109106 onChange = { ( e ) => {
110107 const isChecked = e . currentTarget . checked ;
Original file line number Diff line number Diff line change @@ -252,10 +252,10 @@ function CustomToolbar() {
252252 </ button >
253253 ) }
254254 < input
255- checked = { feature . isEnabledOverride ?? false }
255+ checked = { feature . isEnabledOverride ?? feature . isEnabled }
256256 type = "checkbox"
257257 onChange = { ( e ) => {
258- console . log ( "onChange" , e . target . checked ) ;
258+ // this uses slightly simplified logic compared to the Bucket Toolbar
259259 client
260260 . getFeature ( featureKey )
261261 . setIsEnabledOverride ( e . target . checked ?? false ) ;
@@ -277,6 +277,12 @@ export function App() {
277277 otherContext = { initialOtherContext }
278278 apiBaseUrl = { apiBaseUrl }
279279 >
280+ { ! publishableKey && (
281+ < div >
282+ No publishable key set. Please set the VITE_PUBLISHABLE_KEY
283+ environment variable.
284+ </ div >
285+ ) }
280286 < Demos />
281287 </ BucketProvider >
282288 ) ;
You can’t perform that action at this time.
0 commit comments