Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix!: open coder_app in a new tab, not window
  • Loading branch information
bpmct committed Feb 6, 2023
commit 16394bde1e82f4430f984a4a617b2ae18e1d520d
18 changes: 0 additions & 18 deletions site/src/components/AppLink/AppLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@ import Tooltip from "@material-ui/core/Tooltip"
import ErrorOutlineIcon from "@material-ui/icons/ErrorOutline"
import { FC } from "react"
import * as TypesGen from "../../api/typesGenerated"
import { generateRandomString } from "../../util/random"
import { BaseIcon } from "./BaseIcon"
import { ShareIcon } from "./ShareIcon"

const Language = {
appTitle: (appName: string, identifier: string): string =>
`${appName} - ${identifier}`,
}

export interface AppLinkProps {
appsHost?: string
workspace: TypesGen.Workspace
Expand Down Expand Up @@ -98,18 +92,6 @@ export const AppLink: FC<AppLinkProps> = ({
href={href}
target="_blank"
className={canClick ? styles.link : styles.disabledLink}
onClick={
canClick
? (event) => {
event.preventDefault()
window.open(
href,
Language.appTitle(appDisplayName, generateRandomString(12)),
"width=900,height=600",
)
}
: undefined
}
>
{button}
</Link>
Expand Down