Skip to content

Commit

Permalink
fix: Add custom title to no access page (#1376)
Browse files Browse the repository at this point in the history
  • Loading branch information
leSamo authored Nov 19, 2021
1 parent e90afd6 commit 5ccd4ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import messages from '../../../Messages';
import Header from '../../PresentationalComponents/Header/Header';
import { NotAuthorized } from '../EmptyStates/EmptyStates';

const NoAccessPage = ({ intl }) => {
const NoAccessPage = ({ intl, title = intl.formatMessage(messages.vulnerabilitiesHeader) }) => {
return (
<React.Fragment>
<Header
title={intl.formatMessage(messages.vulnerabilitiesHeader)}
title={title}
showBreadcrumb={false}
/>
<Main>
Expand All @@ -22,7 +22,8 @@ const NoAccessPage = ({ intl }) => {
};

NoAccessPage.propTypes = {
intl: propTypes.any
intl: propTypes.any,
title: propTypes.string
};

export default injectIntl(
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SmartComponents/Reports/ReportsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const ReportsPage = () => {
label={messages.configModalExportReport}
/>}
</React.Fragment>
: <NoAccessPage />
: <NoAccessPage title={intl.formatMessage(messages.reportsPageTitle)} />
);
};

Expand Down

0 comments on commit 5ccd4ff

Please sign in to comment.