mirror of
https://github.com/strapi/strapi.git
synced 2025-11-07 05:38:13 +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>
|
<SubNavSections>
|
||||||
{menu.map(section => {
|
{menu.map(section => (
|
||||||
const title = section.title.id;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<React.Fragment key={section.name}>
|
<React.Fragment key={section.name}>
|
||||||
<SubNavSection
|
<SubNavSection
|
||||||
label={formatMessage({ id: title, defaultMessage: title })}
|
label={formatMessage({
|
||||||
|
id: section.title.id,
|
||||||
|
defaultMessage: section.title.defaultMessage,
|
||||||
|
})}
|
||||||
collapsable
|
collapsable
|
||||||
badgeLabel={section.links.length.toString()}
|
badgeLabel={section.links.length.toString()}
|
||||||
>
|
>
|
||||||
@ -82,11 +82,7 @@ const ContentTypeBuilderNav = () => {
|
|||||||
</SubNavSection>
|
</SubNavSection>
|
||||||
{section.customLink && (
|
{section.customLink && (
|
||||||
<Box paddingLeft={7}>
|
<Box paddingLeft={7}>
|
||||||
<TextButton
|
<TextButton onClick={section.customLink.onClick} startIcon={<Plus />} marginTop={2}>
|
||||||
onClick={section.customLink.onClick}
|
|
||||||
startIcon={<Plus />}
|
|
||||||
marginTop={2}
|
|
||||||
>
|
|
||||||
{formatMessage({
|
{formatMessage({
|
||||||
id: section.customLink.id,
|
id: section.customLink.id,
|
||||||
defaultMessage: section.customLink.defaultMessage,
|
defaultMessage: section.customLink.defaultMessage,
|
||||||
@ -95,8 +91,7 @@ const ContentTypeBuilderNav = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
))}
|
||||||
})}
|
|
||||||
</SubNavSections>
|
</SubNavSections>
|
||||||
</SubNav>
|
</SubNav>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user