File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
routes/device/manage-backups Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,13 @@ export const App = () => {
83
83
return ;
84
84
}
85
85
// if no devices are registered on specified views route to /
86
- if ( Object . keys ( devices ) . length === 0 &&
87
- currentURL . startsWith ( '/settings/device-settings/' ) ) {
86
+ if (
87
+ Object . keys ( devices ) . length === 0
88
+ && (
89
+ currentURL . startsWith ( '/settings/device-settings/' )
90
+ || currentURL . startsWith ( '/manage-backups/' )
91
+ )
92
+ ) {
88
93
navigate ( '/' ) ;
89
94
return ;
90
95
}
Original file line number Diff line number Diff line change 16
16
*/
17
17
18
18
import { useTranslation } from 'react-i18next' ;
19
- import { useNavigate } from 'react-router-dom' ;
20
19
import { TDevices } from '@/api/devices' ;
21
20
import { BackButton } from '@/components/backbutton/backbutton' ;
22
21
import { Guide } from '@/components/guide/guide' ;
@@ -36,10 +35,8 @@ export const ManageBackups = ({
36
35
devices,
37
36
} : TProps ) => {
38
37
const { t } = useTranslation ( ) ;
39
- const navigate = useNavigate ( ) ;
40
38
41
39
if ( ! deviceID || ! devices [ deviceID ] ) {
42
- navigate ( '/' ) ;
43
40
return null ;
44
41
}
45
42
You can’t perform that action at this time.
0 commit comments