Skip to content

Commit

Permalink
feat: Upgrade cozy-viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Dec 19, 2024
1 parent 9d0d0ed commit e821264
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"cozy-realtime": "^5.0.0",
"cozy-sharing": "^16.17.0",
"cozy-ui": "^114.0.1",
"cozy-viewer": "^9.1.0",
"cozy-viewer": "^10.0.0",
"date-fns": "2.23.0",
"flexsearch": "0.7.31",
"leaflet": "1.7.1",
Expand Down
8 changes: 0 additions & 8 deletions src/components/Viewer/FilesViewer.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useEffect, useState } from 'react'
import { useLocation } from 'react-router-dom'
import ActionsButtons from 'src/components/Viewer/ActionsButtons'
import FileViewerLoading from 'src/components/Viewer/FileViewerLoading'

Expand Down Expand Up @@ -28,12 +27,6 @@ const FilesViewer = ({ filesQuery, files, fileId, onClose, onChange }) => {
const [currentFile, setCurrentFile] = useState(null)
const [fetchingMore, setFetchingMore] = useState(false)
const client = useClient()
const { pathname } = useLocation()

const editPathByModelProps = {
information: `#${pathname}/edit/information?metadata=__NAME__`,
contact: `#${pathname}/edit/contact`
}

const handleOnClose = () => {
if (onClose) onClose()
Expand Down Expand Up @@ -135,7 +128,6 @@ const FilesViewer = ({ filesQuery, files, fileId, onClose, onChange }) => {
currentIndex={viewerIndex}
onChangeRequest={handleOnChange}
onCloseRequest={handleOnClose}
editPathByModelProps={editPathByModelProps}
>
<ToolbarButtons>
<ActionsButtons toolbar />
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5632,10 +5632,10 @@ cozy-ui@^114.0.1:
react-swipeable-views "^0.13.3"
rooks "^5.11.2"

cozy-viewer@^9.1.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/cozy-viewer/-/cozy-viewer-9.1.0.tgz#13b1bc573076f676ac5f73b98620ef55ebfb7e88"
integrity sha512-X1HjMuCYJNLV9fW5aRVlkwloQbOaxcnsSETaacPJXzxXMyPqDkyuNT1HLqXDWCU5y8WGankMMGJtp9iGre94bg==
cozy-viewer@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/cozy-viewer/-/cozy-viewer-10.0.0.tgz#0dd7d18a6625034bd072698188454ac28289a573"
integrity sha512-8MhPi/OtdkjbpCEInld8awjo1yeinAEoFma1eJpVHoN6Fotj3hHouCdOj0+kqlp7mebUHBtTvUQFGZ0DmWaKSQ==
dependencies:
classnames "^2.2.5"
hammerjs "^2.0.8"
Expand Down

0 comments on commit e821264

Please sign in to comment.