File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ export default function App() {
138138 path = "*"
139139 element = {
140140 < IncorrectPath
141- to = "clusters"
141+ to = "/ clusters"
142142 message = { t (
143143 'components.incorrect-path.message.clusters' ,
144144 ) }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import NamespaceRoutes from './NamespaceRoutes';
2323import { createExtensibilityRoutes } from './ExtensibilityRoutes' ;
2424import { IncorrectPath } from './IncorrectPath' ;
2525import { removePreviousPath } from 'state/useAfterInitHook' ;
26+ import { useUrl } from 'hooks/useUrl' ;
2627
2728export default function ClusterRoutes ( ) {
2829 let { currentClusterName } = useParams ( ) || { } ;
@@ -36,6 +37,7 @@ export default function ClusterRoutes() {
3637 const [ cluster , setCluster ] = useRecoilState ( clusterState ) ;
3738 const [ search ] = useSearchParams ( ) ;
3839 const [ extensibilityRoutes , setExtensibilityRoutes ] = useState ( null ) ;
40+ const { clusterUrl } = useUrl ( ) ;
3941
4042 useEffect ( ( ) => {
4143 if ( extensions ?. length ) {
@@ -76,7 +78,7 @@ export default function ClusterRoutes() {
7678 path = "*"
7779 element = {
7880 < IncorrectPath
79- to = " overview"
81+ to = { clusterUrl ( ' overview' ) }
8082 message = { t ( 'components.incorrect-path.message.cluster' ) }
8183 />
8284 }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import { useGet } from 'shared/hooks/BackendAPI/useGet';
1616export default function NamespaceRoutes ( ) {
1717 const { t } = useTranslation ( ) ;
1818 const { namespaceId } = useParams ( ) ;
19- const { clusterUrl } = useUrl ( ) ;
19+ const { clusterUrl, namespaceUrl } = useUrl ( ) ;
2020 const language = useRecoilValue ( languageAtom ) ;
2121 const extensions = useRecoilValue ( extensionsState ) ;
2222 const [ extensibilityRoutes , setExtensibilityRoutes ] = useState <
@@ -62,7 +62,7 @@ export default function NamespaceRoutes() {
6262 path = "*"
6363 element = {
6464 < IncorrectPath
65- to = ""
65+ to = { namespaceUrl ( '' ) }
6666 message = { t ( 'components.incorrect-path.message.namespace' ) }
6767 />
6868 }
You can’t perform that action at this time.
0 commit comments