Skip to content

Commit 6c1cb47

Browse files
committed
minor: remove session launch link from session page
1 parent 73c3838 commit 6c1cb47

1 file changed

Lines changed: 0 additions & 61 deletions

File tree

client/src/features/sessionsV2/SessionShowPage/ShowSessionPage.tsx

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
Cloud,
2828
ExclamationTriangle,
2929
FileEarmarkText,
30-
Link45deg,
3130
PauseCircle,
3231
Trash,
3332
} from "react-bootstrap-icons";
@@ -59,7 +58,6 @@ import { useGetProjectsByProjectIdSessionLaunchersQuery as useGetProjectSessionL
5958
import { useGetSessionsQuery } from "../api/sessionsV2.api";
6059
import { getSessionFavicon } from "../session.utils";
6160
import { SessionV2 } from "../sessionsV2.types";
62-
import SessionStartLinkModal from "../SessionView/SessionStartLinkModal";
6361
import SessionIframe from "./SessionIframe";
6462
import SessionPaused from "./SessionPaused";
6563
import SessionUnavailable from "./SessionUnavailable";
@@ -216,11 +214,6 @@ export default function ShowSessionPage() {
216214
<LogsBtn toggle={toggleModalLogs} />
217215
<PauseSessionBtn openPauseSession={openPauseSession} />
218216
<DeleteSessionBtn openDeleteSession={openDeleteSession} />
219-
<ShareSessionLinkButton
220-
session={thisSession}
221-
namespace={namespace}
222-
slug={slug}
223-
/>
224217
</div>
225218
<div
226219
className={cx(
@@ -512,57 +505,3 @@ function SessionDetails({
512505
</>
513506
);
514507
}
515-
516-
function ShareSessionLinkButton({
517-
session,
518-
namespace,
519-
slug,
520-
}: {
521-
session?: SessionV2;
522-
namespace?: string;
523-
slug?: string;
524-
}) {
525-
const launcherId = session?.launcher_id;
526-
const ref = useRef<HTMLButtonElement>(null);
527-
const buttonId = "share-session-button";
528-
const tooltip = "Share session launch link";
529-
530-
const [isShareLinkOpen, setIsShareLinkOpen] = useState(false);
531-
const toggleShareLink = useCallback(() => {
532-
setIsShareLinkOpen((open) => !open);
533-
}, []);
534-
535-
if (launcherId == null || namespace == null || slug == null) return null;
536-
537-
return (
538-
<div>
539-
<Button
540-
className={cx(
541-
"bg-transparent",
542-
"border-0",
543-
"no-focus",
544-
"p-0",
545-
"shadow-none",
546-
"text-dark"
547-
)}
548-
data-cy={buttonId}
549-
id={buttonId}
550-
innerRef={ref}
551-
onClick={toggleShareLink}
552-
>
553-
<Link45deg className="bi" />
554-
<span className="visually-hidden">{tooltip}</span>
555-
</Button>
556-
<UncontrolledTooltip placement="bottom" target={ref}>
557-
{tooltip}
558-
</UncontrolledTooltip>
559-
<SessionStartLinkModal
560-
isOpen={isShareLinkOpen}
561-
launcherId={launcherId}
562-
toggle={toggleShareLink}
563-
slug={slug}
564-
namespace={namespace}
565-
/>
566-
</div>
567-
);
568-
}

0 commit comments

Comments
 (0)