Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.

Commit f17d565

Browse files
takaokoujiGemini
andcommitted
refactor: remove unused onReload and onStop from Modal component
- Removed onReload and onStop from propTypes and conditional rendering logic. - Removed unused reloadIcon and stopIcon imports. - Kept loading state and progressBar functionality as they are still used. Co-Authored-By: Gemini <noreply@google.com>
1 parent 3ec5062 commit f17d565

1 file changed

Lines changed: 0 additions & 45 deletions

File tree

src/components/modal/modal.jsx

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import classNames from 'classnames';
22
import PropTypes from 'prop-types';
3-
import React from 'react';
43
import ReactModal from 'react-modal';
54
import {FormattedMessage} from 'react-intl';
65

@@ -10,8 +9,6 @@ import CloseButton from '../close-button/close-button.jsx';
109

1110
import backIcon from '../../lib/assets/icon--back.svg';
1211
import helpIcon from '../../lib/assets/icon--help.svg';
13-
import reloadIcon from '../../lib/assets/icon--reload.svg';
14-
import stopIcon from '../close-button/icon--close.svg';
1512

1613
import styles from './modal.css';
1714

@@ -76,46 +73,6 @@ const ModalComponent = props => (
7673
{props.headerActions}
7774
</div>
7875
) : null}
79-
{props.loading && props.onStop ? (
80-
<div
81-
className={classNames(
82-
styles.headerItem,
83-
styles.headerItemReload
84-
)}
85-
>
86-
<Button
87-
className={styles.reloadButton}
88-
iconClassName={styles.stopIcon}
89-
iconSrc={stopIcon}
90-
onClick={props.onStop}
91-
>
92-
<FormattedMessage
93-
defaultMessage="Stop"
94-
description="Stop button in modal"
95-
id="gui.modal.stop"
96-
/>
97-
</Button>
98-
</div>
99-
) : (props.onReload ? (
100-
<div
101-
className={classNames(
102-
styles.headerItem,
103-
styles.headerItemReload
104-
)}
105-
>
106-
<Button
107-
className={styles.reloadButton}
108-
iconSrc={reloadIcon}
109-
onClick={props.onReload}
110-
>
111-
<FormattedMessage
112-
defaultMessage="Reload"
113-
description="Reload button in modal"
114-
id="gui.modal.reload"
115-
/>
116-
</Button>
117-
</div>
118-
) : null)}
11976
<div
12077
className={classNames(
12178
styles.headerItem,
@@ -166,8 +123,6 @@ ModalComponent.propTypes = {
166123
isRtl: PropTypes.bool,
167124
loading: PropTypes.bool,
168125
onHelp: PropTypes.func,
169-
onReload: PropTypes.func,
170-
onStop: PropTypes.func,
171126
onRequestClose: PropTypes.func
172127
};
173128

0 commit comments

Comments
 (0)