Skip to content

Commit b4c44e9

Browse files
authored
fix: remove unneeded titles (#1508)
1 parent e3dfcba commit b4c44e9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/containers/UserSettings/UserSettings.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ export const UserSettings = ({settings: userSettings}: UserSettingsProps) => {
1111
return (
1212
<Settings>
1313
{userSettings.map((page) => {
14-
const {id, title, icon, sections = []} = page;
14+
const {id, title, icon, sections = [], showTitle} = page;
1515

1616
return (
1717
<Settings.Page key={id} id={id} title={title} icon={icon}>
1818
{sections.map((section) => {
1919
const {title: sectionTitle, settings: sectionSettings = []} = section;
2020

2121
return (
22-
<Settings.Section key={id} title={sectionTitle}>
22+
<Settings.Section
23+
key={id}
24+
title={sectionTitle}
25+
showTitle={showTitle ?? true}
26+
>
2327
{sectionSettings.map((setting) => {
2428
if (setting.type === 'info') {
2529
return (

src/containers/UserSettings/settings.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export interface SettingsPage {
3131
title: string;
3232
icon: IconProps;
3333
sections: SettingsSection[];
34+
// default true
35+
showTitle?: false;
3436
}
3537

3638
export type YDBEmbeddedUISettings = SettingsPage[];
@@ -155,12 +157,14 @@ export const generalPage: SettingsPage = {
155157
title: i18n('page.general'),
156158
icon: {data: StarFill, height: 14, width: 14},
157159
sections: [appearanceSection],
160+
showTitle: false,
158161
};
159162
export const experimentsPage: SettingsPage = {
160163
id: 'experimentsPage',
161164
title: i18n('page.experiments'),
162165
icon: {data: Flask},
163166
sections: [experimentsSection],
167+
showTitle: false,
164168
};
165169
export const editorPage: SettingsPage = {
166170
id: 'editorPage',
@@ -174,6 +178,7 @@ export const aboutPage: SettingsPage = {
174178
title: i18n('page.about'),
175179
icon: {data: CircleInfo},
176180
sections: [aboutSettingsSection],
181+
showTitle: false,
177182
};
178183

179184
export function getUserSettings({singleClusterMode}: {singleClusterMode: boolean}) {

0 commit comments

Comments
 (0)