Skip to content

Commit 54fd3c3

Browse files
committed
Make template name on sidebar a link
1 parent d657b70 commit 54fd3c3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

site/src/pages/TemplateSettingsPage/Sidebar.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import VariablesIcon from "@material-ui/icons/CodeOutlined"
44
import { Template } from "api/typesGenerated"
55
import { Stack } from "components/Stack/Stack"
66
import { FC, ElementType, PropsWithChildren, ReactNode } from "react"
7-
import { NavLink } from "react-router-dom"
7+
import { Link, NavLink } from "react-router-dom"
88
import { combineClasses } from "util/combineClasses"
99
import GeneralIcon from "@material-ui/icons/SettingsOutlined"
1010
import SecurityIcon from "@material-ui/icons/LockOutlined"
@@ -52,11 +52,11 @@ export const Sidebar: React.FC<{ template: Template }> = ({ template }) => {
5252
>
5353
<Avatar src={template.icon} variant="square" fitImage />
5454
<Stack spacing={0} className={styles.templateData}>
55-
<span className={styles.name}>
55+
<Link className={styles.name} to={`/templates/${template.name}`}>
5656
{template.display_name !== ""
5757
? template.display_name
5858
: template.name}
59-
</span>
59+
</Link>
6060
<span className={styles.secondary}>{template.name}</span>
6161
</Stack>
6262
</Stack>
@@ -137,6 +137,8 @@ const useStyles = makeStyles((theme) => ({
137137
overflow: "hidden",
138138
textOverflow: "ellipsis",
139139
whiteSpace: "nowrap",
140+
color: theme.palette.text.primary,
141+
textDecoration: "none",
140142
},
141143
secondary: {
142144
color: theme.palette.text.secondary,

0 commit comments

Comments
 (0)