Skip to content

Commit

Permalink
fix types for featuresControl and add default value for logo-generato…
Browse files Browse the repository at this point in the history
…r feature
  • Loading branch information
CGastrell committed Oct 19, 2024
1 parent c8615d4 commit a1f3029
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ const INITIAL_STATE: LogoGeneratorStateProp = {
asyncRequestTimerId: 0,
isRequestingImage: false,
},
featuresControl: {
'logo-generator': {
enabled: false,
styles: [],
},
},
},
},
history: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ export type LogoGeneratorFeatureControl = FeatureControl & {

export type FeatureControl = {
enabled: boolean;
'min-jetpack-version': string;
[ key: string ]: FeatureControl | LogoGeneratorFeatureControl | boolean | string;
};

export type FeaturesControl = { [ key: string ]: FeatureControl };
export type FeaturesControl = {
[ key: string ]: FeatureControl | LogoGeneratorFeatureControl;
};

export type AiFeatureProps = {
hasFeature: boolean;
Expand Down

0 comments on commit a1f3029

Please sign in to comment.