Refactor handleOpenInNewTab function in AboutSystemContainer.js
parent
1ba19eb96c
commit
f8d0d7c486
|
@ -38,7 +38,7 @@ const buttons = [
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const AboutSystemComponent = ({ handleOpenInNewTab }) => {
|
const AboutSystemComponent = ({ onOpenInNewTab }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const bullet = <span style={styles.bullet}>•</span>;
|
const bullet = <span style={styles.bullet}>•</span>;
|
||||||
|
@ -80,7 +80,7 @@ const AboutSystemComponent = ({ handleOpenInNewTab }) => {
|
||||||
size="small"
|
size="small"
|
||||||
color="primary"
|
color="primary"
|
||||||
startIcon={<OpenInNewIcon />}
|
startIcon={<OpenInNewIcon />}
|
||||||
onClick={handleOpenInNewTab(button.url)}
|
onClick={onOpenInNewTab(button.url)}
|
||||||
>
|
>
|
||||||
{t(button.code)}
|
{t(button.code)}
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -91,7 +91,7 @@ const AboutSystemComponent = ({ handleOpenInNewTab }) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
AboutSystemComponent.propTypes = {
|
AboutSystemComponent.propTypes = {
|
||||||
handleOpenInNewTab: PropTypes.func.isRequired
|
onOpenInNewTab: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AboutSystemComponent;
|
export default AboutSystemComponent;
|
||||||
|
|
|
@ -21,7 +21,7 @@ const handleOpenInNewTab = url => event => {
|
||||||
const AboutSystemContainer = () => {
|
const AboutSystemContainer = () => {
|
||||||
return (
|
return (
|
||||||
<Box sx={styles.page}>
|
<Box sx={styles.page}>
|
||||||
<AboutSystemComponent handleOpenInNewTab={handleOpenInNewTab} />
|
<AboutSystemComponent onOpenInNewTab={handleOpenInNewTab} />
|
||||||
<Box sx={styles.element}>
|
<Box sx={styles.element}>
|
||||||
<SystemVersionContainer />
|
<SystemVersionContainer />
|
||||||
</Box>
|
</Box>
|
||||||
|
|
Loading…
Reference in New Issue