fix: catalog jump to deployments route error
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ const checkDefaultPage = async (userInfo: any) => {
|
|||||||
if (isFirstLogin === null && isOnline()) {
|
if (isFirstLogin === null && isOnline()) {
|
||||||
writeState(IS_FIRST_LOGIN, true);
|
writeState(IS_FIRST_LOGIN, true);
|
||||||
if (userInfo && userInfo?.is_admin) {
|
if (userInfo && userInfo?.is_admin) {
|
||||||
history.push('/models/deployment');
|
history.push('/models/deployments');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ const Catalog: React.FC = () => {
|
|||||||
});
|
});
|
||||||
message.success(intl.formatMessage({ id: 'common.message.success' }));
|
message.success(intl.formatMessage({ id: 'common.message.success' }));
|
||||||
setModelsExpandKeys([modelData.id]);
|
setModelsExpandKeys([modelData.id]);
|
||||||
navigate('/models/deployment');
|
navigate('/models/deployments');
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
},
|
},
|
||||||
[openDeployModal]
|
[openDeployModal]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const checkDefaultPage = async (userInfo: any, replace: boolean) => {
|
|||||||
if (isFirstLogin === null && isOnline()) {
|
if (isFirstLogin === null && isOnline()) {
|
||||||
writeState(IS_FIRST_LOGIN, true);
|
writeState(IS_FIRST_LOGIN, true);
|
||||||
const pathname =
|
const pathname =
|
||||||
userInfo && userInfo?.is_admin ? '/models/deployment' : '/playground';
|
userInfo && userInfo?.is_admin ? '/models/deployments' : '/playground';
|
||||||
history.push(pathname);
|
history.push(pathname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -542,7 +542,7 @@ const ModelFiles = () => {
|
|||||||
});
|
});
|
||||||
message.success(intl.formatMessage({ id: 'common.message.success' }));
|
message.success(intl.formatMessage({ id: 'common.message.success' }));
|
||||||
setModelsExpandKeys([modelData.id]);
|
setModelsExpandKeys([modelData.id]);
|
||||||
navigate('/models/deployment');
|
navigate('/models/deployments');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// console.log('error', error);
|
// console.log('error', error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user