Refactor handleOpenInNewTab function in AboutSystemContainer.js

master^2
Tudor Stanciu 2024-11-10 01:12:01 +02:00
parent 1ba19eb96c
commit f8d0d7c486
2 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ const buttons = [
}
];
const AboutSystemComponent = ({ handleOpenInNewTab }) => {
const AboutSystemComponent = ({ onOpenInNewTab }) => {
const { t } = useTranslation();
const bullet = <span style={styles.bullet}></span>;
@ -80,7 +80,7 @@ const AboutSystemComponent = ({ handleOpenInNewTab }) => {
size="small"
color="primary"
startIcon={<OpenInNewIcon />}
onClick={handleOpenInNewTab(button.url)}
onClick={onOpenInNewTab(button.url)}
>
{t(button.code)}
</Button>
@ -91,7 +91,7 @@ const AboutSystemComponent = ({ handleOpenInNewTab }) => {
};
AboutSystemComponent.propTypes = {
handleOpenInNewTab: PropTypes.func.isRequired
onOpenInNewTab: PropTypes.func.isRequired
};
export default AboutSystemComponent;

View File

@ -21,7 +21,7 @@ const handleOpenInNewTab = url => event => {
const AboutSystemContainer = () => {
return (
<Box sx={styles.page}>
<AboutSystemComponent handleOpenInNewTab={handleOpenInNewTab} />
<AboutSystemComponent onOpenInNewTab={handleOpenInNewTab} />
<Box sx={styles.element}>
<SystemVersionContainer />
</Box>