Skip to content

Commit

Permalink
refactor: clear unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
badgooooor committed Feb 3, 2025
1 parent e381d4e commit 40f58d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/bundles/files/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ const actions = () => ({
* @param {File} file
* @param {string} name
*/
doAddCarFile: (file, name = '', root = '') => perform(ACTIONS.ADD_CAR_FILE, async (ipfs, { store }) => {
doAddCarFile: (file, name = '') => perform(ACTIONS.ADD_CAR_FILE, async (ipfs, { store }) => {
ensureMFS(store)

try {
Expand All @@ -412,7 +412,7 @@ const actions = () => ({
wrapWithDirectory: false
})
const src = `/ipfs/${result.cid}`
const dst = join(realMfsPath(root || '/files'), result.path)
const dst = join(realMfsPath('/files'), name)
try {
await ipfs.files.cp(src, dst)
} catch (err) {
Expand Down
6 changes: 2 additions & 4 deletions src/files/FilesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ const FilesPage = ({
}

const onAddByPath = (path, name) => doFilesAddPath(files.path, path, name)
const onAddByCar = (file, name, root = '') => {
if (root === '') root = files.path

doAddCarFile(file, name, root)
const onAddByCar = (file, name) => {
doAddCarFile(file, name)
}
const onInspect = (cid) => doUpdateHash(`/explore/${cid}`)
const showModal = (modal, files = null) => setModals({ show: modal, files })
Expand Down

0 comments on commit 40f58d0

Please sign in to comment.