Skip to content

Commit 80fc4ca

Browse files
refactor: [UEPR-176] change method names
1 parent 86855b2 commit 80fc4ca

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

packages/scratch-gui/src/components/gui/gui.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ const GUIComponent = props => {
8686
costumeLibraryVisible,
8787
costumesTabVisible,
8888
debugModalVisible,
89-
displayDebugFeedback,
90-
displayTutorialsFeedback,
89+
onDebugModalClose,
90+
onTutorialSelect,
9191
enableCommunity,
9292
intl,
9393
isCreating,
@@ -149,12 +149,12 @@ const GUIComponent = props => {
149149
tabSelected: classNames(tabStyles.reactTabsTabSelected, styles.isSelected)
150150
};
151151

152-
const onDebugModalClose = useCallback(() => {
153-
if (displayDebugFeedback) {
154-
displayDebugFeedback();
152+
const onCloseDebugModal = useCallback(() => {
153+
if (onDebugModalClose) {
154+
onDebugModalClose();
155155
}
156156
onRequestCloseDebugModal();
157-
}, [displayDebugFeedback, onRequestCloseDebugModal]);
157+
}, [onDebugModalClose, onRequestCloseDebugModal]);
158158

159159
if (isRendererSupported === null) {
160160
isRendererSupported = Renderer.isSupported();
@@ -205,7 +205,7 @@ const GUIComponent = props => {
205205
{tipsLibraryVisible ? (
206206
<TipsLibrary
207207
hideTutorialProjects={hideTutorialProjects}
208-
displayTutorialsFeedback={displayTutorialsFeedback}
208+
onTutorialSelect={onTutorialSelect}
209209
/>
210210
) : null}
211211
{cardsVisible ? (
@@ -227,7 +227,7 @@ const GUIComponent = props => {
227227
) : null}
228228
{<DebugModal
229229
isOpen={debugModalVisible}
230-
onClose={onDebugModalClose}
230+
onClose={onCloseDebugModal}
231231
/>}
232232
{backdropLibraryVisible ? (
233233
<BackdropLibrary
@@ -426,8 +426,8 @@ GUIComponent.propTypes = {
426426
costumeLibraryVisible: PropTypes.bool,
427427
costumesTabVisible: PropTypes.bool,
428428
debugModalVisible: PropTypes.bool,
429-
displayDebugFeedback: PropTypes.func,
430-
displayTutorialsFeedback: PropTypes.func,
429+
onDebugModalClose: PropTypes.func,
430+
onTutorialSelect: PropTypes.func,
431431
enableCommunity: PropTypes.bool,
432432
intl: intlShape.isRequired,
433433
isCreating: PropTypes.bool,

packages/scratch-gui/src/containers/tips-library.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class TipsLibrary extends React.PureComponent {
5858
return window.open(window.location.origin + urlParams, '_blank');
5959
}
6060

61-
if (this.props.displayTutorialsFeedback) {
62-
this.props.displayTutorialsFeedback();
61+
if (this.props.onTutorialSelect) {
62+
this.props.onTutorialSelect();
6363
}
6464
this.props.onActivateDeck(item.id);
6565
}
@@ -116,7 +116,7 @@ class TipsLibrary extends React.PureComponent {
116116
}
117117

118118
TipsLibrary.propTypes = {
119-
displayTutorialsFeedback: PropTypes.func,
119+
onTutorialSelect: PropTypes.func,
120120
intl: intlShape.isRequired,
121121
onActivateDeck: PropTypes.func.isRequired,
122122
onRequestClose: PropTypes.func,

0 commit comments

Comments
 (0)