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 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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue