Skip to content

Commit

Permalink
fix:(nextcloud): Keep user on same page after duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Aug 6, 2024
1 parent 5de7b18 commit 028bf14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/views/Nextcloud/NextcloudDuplicateView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const NextcloudDuplicateView: FC = () => {
const currentFolder = useNextcloudCurrentFolder()
const { entries, hasEntries, isLoading } = useNextcloudEntries()

const newPath = getParentPath(pathname) ?? '' + `?${searchParams.toString()}`
const newPath =
(getParentPath(pathname) ?? '') + `?${searchParams.toString()}`

if (!hasEntries && !isLoading) {
return <Navigate to={newPath} replace />
Expand Down

0 comments on commit 028bf14

Please sign in to comment.