remove fallback routing to hub/home for unknown routes (#3954)
This commit is contained in:
@@ -958,28 +958,6 @@ export default function App() {
|
||||
console.log(
|
||||
'Ignoring recipe config changes to prevent navigation conflicts with new window creation'
|
||||
);
|
||||
} else {
|
||||
// Only navigate to chat route if we're not already on a valid route
|
||||
const currentHash = window.location.hash;
|
||||
const validRoutes = [
|
||||
'#/',
|
||||
'#/pair',
|
||||
'#/settings',
|
||||
'#/sessions',
|
||||
'#/schedules',
|
||||
'#/recipes',
|
||||
'#/permission',
|
||||
'#/configure-providers',
|
||||
'#/shared-session',
|
||||
'#/recipe-editor',
|
||||
'#/extensions',
|
||||
];
|
||||
|
||||
if (!validRoutes.includes(currentHash)) {
|
||||
console.log('No valid route detected, navigating to chat route (hub)');
|
||||
window.location.hash = '#/';
|
||||
window.history.replaceState({}, '', '#/');
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error in system initialization:', error);
|
||||
|
||||
Reference in New Issue
Block a user