Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
barbalex committed Nov 28, 2024
1 parent 5d466d5 commit a74d3f7
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/components/shared/Files/Menu/PreviewMenus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,13 @@ export const PreviewMenus = memo(
const onClickNext = useCallback(() => {
const nextFileIndex = fileIndex + 1
const nextFile = files[nextFileIndex] ?? files[0]
console.log('Files.Menu.onClickNext', {
fileId,
nextFileId: nextFile.fileId,
fileIndex,
nextFileIndex,
files,
})
navigate(`${nextFile.fileId}/Vorschau`)
}, [fileIndex, files, fileId, navigate])
}, [fileIndex, files, navigate])

const onClickPrev = useCallback(() => {
const prevFile = files[fileIndex - 1] ?? files[files.length - 1]
navigate(`${prevFile.fileId}/Vorschau`)
}, [fileId, files, navigate, fileIndex])
}, [fileIndex, files, navigate])

// enable reacting to fullscreen changes
const [isFullscreen, setIsFullscreen] = useState(false)
Expand Down

0 comments on commit a74d3f7

Please sign in to comment.