From 683ed010f19cbb46bfb50c91032f297180af2863 Mon Sep 17 00:00:00 2001 From: Stefano Brilli Date: Tue, 27 Jul 2021 09:50:21 +0200 Subject: [PATCH] chore: function renaming --- src/components/main.tsx | 6 +++--- src/components/win95/main.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/main.tsx b/src/components/main.tsx index e72d1b2..51483d2 100644 --- a/src/components/main.tsx +++ b/src/components/main.tsx @@ -208,7 +208,7 @@ export const Main = (props: {}) => { const groupedTracks = useMemo(() => getGroupedTracks(disc), [disc]); // Action Handlers - const handleSelectClick = useCallback( + const handleSelectTrackClick = useCallback( (event: React.MouseEvent, item: number) => { if (event.shiftKey && selected.length && lastClicked !== -1) { let rangeBegin = Math.min(lastClicked + 1, item), @@ -361,7 +361,7 @@ export const Main = (props: {}) => { handleRenameActionClick, handleRenameTrack, handleSelectAllClick, - handleSelectClick, + handleSelectTrackClick, }; return ; } @@ -499,7 +499,7 @@ export const Main = (props: {}) => { inGroup={group.title !== null} isSelected={selected.includes(t.index)} isCurrentTrack={isCurrentTrack(t, deviceStatus)} - onSelect={handleSelectClick} + onSelect={handleSelectTrackClick} onRename={handleRenameTrack} onPlay={handlePlayTrack} /> diff --git a/src/components/win95/main.tsx b/src/components/win95/main.tsx index 6a4a70c..5c24960 100644 --- a/src/components/win95/main.tsx +++ b/src/components/win95/main.tsx @@ -108,7 +108,7 @@ export const W95Main = (props: { handleRenameActionClick: (event: React.MouseEvent) => void; handleRenameTrack: (event: React.MouseEvent, item: number) => void; handleSelectAllClick: (event: React.ChangeEvent) => void; - handleSelectClick: (event: React.MouseEvent, item: number) => void; + handleSelectTrackClick: (event: React.MouseEvent, item: number) => void; }) => { const classes = useStyles(); const themeContext = useContext(ThemeContext); @@ -200,7 +200,7 @@ export const W95Main = (props: { style={props.selected.includes(track.index) ? themeContext.selectedTableRow : {}} key={track.index} onDoubleClick={(event: React.MouseEvent) => props.handleRenameTrack(event, track.index)} - onClick={(event: React.MouseEvent) => props.handleSelectClick(event, track.index)} + onClick={(event: React.MouseEvent) => props.handleSelectTrackClick(event, track.index)} > {track.index + 1}