mirror of
https://github.com/strapi/strapi.git
synced 2025-11-12 00:03:40 +00:00
CTB: Improve SubNavSection title, by passing down defaultMessage
This commit is contained in:
parent
3016533fd1
commit
e3fb4d5ae0
@ -42,13 +42,13 @@ const ContentTypeBuilderNav = () => {
|
||||
})}
|
||||
/>
|
||||
<SubNavSections>
|
||||
{menu.map(section => {
|
||||
const title = section.title.id;
|
||||
|
||||
return (
|
||||
{menu.map(section => (
|
||||
<React.Fragment key={section.name}>
|
||||
<SubNavSection
|
||||
label={formatMessage({ id: title, defaultMessage: title })}
|
||||
label={formatMessage({
|
||||
id: section.title.id,
|
||||
defaultMessage: section.title.defaultMessage,
|
||||
})}
|
||||
collapsable
|
||||
badgeLabel={section.links.length.toString()}
|
||||
>
|
||||
@ -82,11 +82,7 @@ const ContentTypeBuilderNav = () => {
|
||||
</SubNavSection>
|
||||
{section.customLink && (
|
||||
<Box paddingLeft={7}>
|
||||
<TextButton
|
||||
onClick={section.customLink.onClick}
|
||||
startIcon={<Plus />}
|
||||
marginTop={2}
|
||||
>
|
||||
<TextButton onClick={section.customLink.onClick} startIcon={<Plus />} marginTop={2}>
|
||||
{formatMessage({
|
||||
id: section.customLink.id,
|
||||
defaultMessage: section.customLink.defaultMessage,
|
||||
@ -95,8 +91,7 @@ const ContentTypeBuilderNav = () => {
|
||||
</Box>
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
})}
|
||||
))}
|
||||
</SubNavSections>
|
||||
</SubNav>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user