Skip to content

Commit 0e17a44

Browse files
committed
fix: include custom section name in section list at homepage
1 parent 722aaa0 commit 0e17a44

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

web-frontend/src/elements/routes/pages/home/HomeView.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,24 @@ function HomeView() {
1919
} = usePropertiesContext();
2020

2121
const elements: JSX.Element[] = [];
22+
const elementLabels: string[] = [];
23+
2224
elements.push(<MassBankInfo />);
25+
elementLabels.push('MassBank');
2326
elements.push(
2427
<Content>
2528
<SectionDivider label="Features" />
2629
<FeaturesOverview />
2730
</Content>,
2831
);
32+
elementLabels.push('Features');
2933
elements.push(
3034
<Content>
3135
<SectionDivider label="Quick Search" />
3236
<QuickSearch />
3337
</Content>,
3438
);
39+
elementLabels.push('Quick Search');
3540

3641
if (homepageNewsSectionText !== '') {
3742
if (homepageNewsSectionText !== 'disabled') {
@@ -44,6 +49,7 @@ function HomeView() {
4449
/>
4550
</Content>,
4651
);
52+
elementLabels.push('Latest News');
4753
}
4854
} else {
4955
elements.push(
@@ -52,6 +58,7 @@ function HomeView() {
5258
<News />
5359
</Content>,
5460
);
61+
elementLabels.push('Latest News');
5562
}
5663

5764
if (homepageFundingSectionText !== '') {
@@ -65,6 +72,7 @@ function HomeView() {
6572
/>
6673
</Content>,
6774
);
75+
elementLabels.push('Funding');
6876
}
6977
} else {
7078
elements.push(
@@ -73,6 +81,7 @@ function HomeView() {
7381
<AcknowledgementNFDI4Chem />
7482
</Content>,
7583
);
84+
elementLabels.push('Funding');
7685
}
7786

7887
if (
@@ -88,16 +97,9 @@ function HomeView() {
8897
/>
8998
</Content>,
9099
);
100+
elementLabels.push(homepageAdditionalSectionName);
91101
}
92102

93-
const elementLabels = [
94-
'MassBank',
95-
'Features',
96-
'Quick Search',
97-
'Latest News',
98-
'Funding',
99-
];
100-
101103
return (
102104
<Layout
103105
style={{

0 commit comments

Comments
 (0)