Skip to content

Commit

Permalink
Update heading with description logic
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Oct 17, 2023
1 parent 295a55b commit 2e2bd28
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ const LearnMore = () => {
fullServiceCreativeTeamLink
);

const headingWithDescriptions = brandConfig?.views?.sidebar?.infoPanel
?.headingWithDescriptions?.shown
? content.information.headingWithDescriptions.filter(
( headingWithDescription, idx ) => {
return brandConfig?.views?.sidebar?.infoPanel?.headingWithDescriptions?.shown?.includes(
idx
);
}
)
: content.information.headingWithDescriptions;

return (
<div className="nfd-onboarding-sidebar-learn-more__get-started-welcome">
<StepIntroPanel
Expand All @@ -67,15 +78,7 @@ const LearnMore = () => {
{ brandConfig?.views?.sidebar?.illustration?.shown !== false && (
<IllustrationPanel cssIcon={ content.illustration.icon } />
) }
<InfoPanel
headingWithDescriptions={ content.information.headingWithDescriptions.filter(
( headingWithDescription, idx ) => {
return brandConfig?.views?.sidebar?.infoPanel?.headingWithDescriptions?.shown?.includes(
idx
);
}
) }
/>
<InfoPanel headingWithDescriptions={ headingWithDescriptions } />
<HelpPanel>
{ brandConfig?.views?.sidebar?.experts?.shown !== false &&
content.help.experts.link && (
Expand Down

0 comments on commit 2e2bd28

Please sign in to comment.