chore(UI): remove template link from workspaces page row (#6882)

* chore(UI): remove template link from workspaces page row

* remove stack and span as per PR comment
This commit is contained in:
Kira Pilot
2023-03-30 10:32:23 -07:00
committed by GitHub
parent b5f5740d0b
commit 3b52d4f336
@@ -5,15 +5,13 @@ import KeyboardArrowRight from "@material-ui/icons/KeyboardArrowRight"
import { AvatarData } from "components/AvatarData/AvatarData"
import { WorkspaceStatusBadge } from "components/WorkspaceStatusBadge/WorkspaceStatusBadge"
import { FC } from "react"
import { useNavigate, Link as RouterLink } from "react-router-dom"
import { useNavigate } from "react-router-dom"
import { getDisplayWorkspaceTemplateName } from "util/workspace"
import { LastUsed } from "../LastUsed/LastUsed"
import { Workspace } from "api/typesGenerated"
import { OutdatedHelpTooltip } from "components/Tooltips/OutdatedHelpTooltip"
import { Avatar } from "components/Avatar/Avatar"
import { Stack } from "components/Stack/Stack"
import TemplateLinkIcon from "@material-ui/icons/OpenInNewOutlined"
import Link from "@material-ui/core/Link"
import { useClickableTableRow } from "hooks/useClickableTableRow"
export const WorkspacesRow: FC<{
@@ -57,22 +55,7 @@ export const WorkspacesRow: FC<{
/>
</TableCell>
<TableCell>
<Link
component={RouterLink}
to={`/templates/${workspace.template_name}`}
className={styles.templateLink}
title={`Go to ${displayTemplateName} page`}
onClick={(e) => {
e.stopPropagation()
}}
>
<Stack direction="row" alignItems="center" spacing={1}>
<TemplateLinkIcon className={styles.templateLinkIcon} />
<span>{displayTemplateName}</span>
</Stack>
</Link>
</TableCell>
<TableCell>{displayTemplateName}</TableCell>
<TableCell>
<LastUsed lastUsedAt={workspace.last_used_at} />
@@ -102,18 +85,4 @@ const useStyles = makeStyles((theme) => ({
display: "flex",
paddingLeft: theme.spacing(2),
},
templateLink: {
color: theme.palette.text.secondary,
"&:hover": {
color: theme.palette.text.primary,
textDecoration: "none",
},
},
templateLinkIcon: {
width: theme.spacing(1.5),
height: theme.spacing(1.5),
},
}))