Skip to content

Commit

Permalink
feat: added title param to SideMenuByTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Nov 6, 2023
1 parent 5a02f24 commit d6718b4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/ItaliaTheme/View/Commons/SideMenuByTitles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ import cx from 'classnames';
const messages = defineMessages({
index: {
id: 'index',
defaultMessage: 'Indice',
},
contenuto: {
id: 'Contenuto',
defaultMessage: 'Contenuto',
defaultMessage: 'Indice della pagina',
},
});

Expand Down Expand Up @@ -62,7 +58,7 @@ const extractHeaders = (elements, intl) => {
* @params {object} content: Content object.
* @returns {string} Markup of the component.
*/
const SideMenuByTitles = ({ data, content_uid }) => {
const SideMenuByTitles = ({ data, content_uid, index_title }) => {
const intl = useIntl();

const [headers, setHeaders] = useState([]);
Expand Down Expand Up @@ -166,7 +162,7 @@ const SideMenuByTitles = ({ data, content_uid }) => {
setIsNavOpen(!isNavOpen);
}}
>
<h3>{intl.formatMessage(messages.index)}</h3>
<h3>{index_title ?? intl.formatMessage(messages.index)}</h3>
</AccordionHeader>
<div className="mb-3">
<Progress
Expand Down

0 comments on commit d6718b4

Please sign in to comment.