fix(sessions): open instance URL in new tab
Update handleOpen in SessionsPage to open the instance URL in a new tab when available, instead of navigating to the project page. Falls back to project navigation if no URL.
This commit is contained in:
@@ -156,7 +156,11 @@ export const SessionsPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleOpen = (session: Session) => {
|
const handleOpen = (session: Session) => {
|
||||||
navigate(`/projects/${session.project_name}/repositories/${session.repository_name}`);
|
if (session.url) {
|
||||||
|
window.open(session.url, '_blank', 'noopener,noreferrer');
|
||||||
|
} else {
|
||||||
|
navigate(`/projects/${session.project_id}`);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleResumeLast = async () => {
|
const handleResumeLast = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user