Skip to content

fix: don't navigate away from editor after publishing #9153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 17, 2023
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
Prev Previous commit
make template name clickable
  • Loading branch information
aslilac committed Aug 17, 2023
commit 4583450e39f92720bc151c304108323d6621db75
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Button from "@mui/material/Button"
import IconButton from "@mui/material/IconButton"
import Link from "@mui/material/Link"
import { makeStyles } from "@mui/styles"
import Tooltip from "@mui/material/Tooltip"
import CreateIcon from "@mui/icons-material/AddOutlined"
Expand All @@ -13,6 +14,7 @@ import {
VariableValue,
WorkspaceResource,
} from "api/typesGenerated"
import { Link as RouterLink } from "react-router-dom"
import { Alert, AlertDetail } from "components/Alert/Alert"
import { Avatar } from "components/Avatar/Avatar"
import { AvatarData } from "components/AvatarData/AvatarData"
Expand Down Expand Up @@ -186,15 +188,21 @@ export const TemplateVersionEditor: FC<TemplateVersionEditorProps> = ({
<div className={styles.root}>
<div className={styles.topbar} data-testid="topbar">
<div className={styles.topbarSides}>
<AvatarData
title={template.display_name || template.name}
subtitle={template.description}
avatar={
hasIcon && (
<Avatar src={template.icon} variant="square" fitImage />
)
}
/>
<Link
component={RouterLink}
underline="none"
to={`/templates/${template.name}`}
>
<AvatarData
title={template.display_name || template.name}
subtitle={template.description}
avatar={
hasIcon && (
<Avatar src={template.icon} variant="square" fitImage />
)
}
/>
</Link>
</div>

<div className={styles.topbarSides}>
Expand Down