Skip to content

Commit a772864

Browse files
committed
Rename onBeforeClick to onBeforePlay in ScrollBottomButton
Updated the prop name in ScrollBottomButton component to better align with its functionality, distinguishing between general click actions and actions specifically occurring before playing an animation or media. Also refactored the associated function and its invocation to ensure consistent naming throughout the code.
1 parent 7ab4f8b commit a772864

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frontend-next-migration/src/features/ScrollBottom/ui/ScrollBottomButton.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface Props {
99
className?: string;
1010
text?: string;
1111
isDisabled?: boolean;
12-
onBeforeClick?: () => void;
12+
onBeforePlay?: () => void;
1313
}
1414

1515
const ScrollBottomButtonComponent = (props: Props) => {
@@ -18,15 +18,15 @@ const ScrollBottomButtonComponent = (props: Props) => {
1818
className = '',
1919
text = 'play',
2020
isDisabled = false,
21-
onBeforeClick,
21+
onBeforePlay,
2222
} = props;
2323

2424
const ScrollButtonId = 'ScrollButton';
2525
const animationFrameIdRef = useRef<number>(0);
2626

2727
const handleWatchClick = () => {
28-
if (onBeforeClick) {
29-
onBeforeClick();
28+
if (onBeforePlay) {
29+
onBeforePlay();
3030
}
3131

3232
scrollToBottom(speedInMs, animationFrameIdRef);

0 commit comments

Comments
 (0)