Skip to content

Commit a2446c3

Browse files
BrunoQuaresmakylecarbs
authored andcommitted
Remove create template button from the UI (#1793)
1 parent c1d1e1d commit a2446c3

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

site/src/pages/TemplatesPage/TemplatesPageView.tsx

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import Avatar from "@material-ui/core/Avatar"
22
import Box from "@material-ui/core/Box"
3-
import Button from "@material-ui/core/Button"
43
import Link from "@material-ui/core/Link"
54
import { makeStyles } from "@material-ui/core/styles"
65
import Table from "@material-ui/core/Table"
76
import TableBody from "@material-ui/core/TableBody"
87
import TableCell from "@material-ui/core/TableCell"
98
import TableHead from "@material-ui/core/TableHead"
109
import TableRow from "@material-ui/core/TableRow"
11-
import AddCircleOutline from "@material-ui/icons/AddCircleOutline"
1210
import dayjs from "dayjs"
1311
import relativeTime from "dayjs/plugin/relativeTime"
1412
import React from "react"
@@ -22,7 +20,6 @@ import { firstLetter } from "../../util/firstLetter"
2220
dayjs.extend(relativeTime)
2321

2422
export const Language = {
25-
createButton: "Create template",
2623
developerCount: (ownerCount: number): string => {
2724
return `${ownerCount} developer${ownerCount !== 1 ? "s" : ""}`
2825
},
@@ -43,11 +40,8 @@ export interface TemplatesPageViewProps {
4340
export const TemplatesPageView: React.FC<TemplatesPageViewProps> = (props) => {
4441
const styles = useStyles()
4542
return (
46-
<Stack spacing={4}>
43+
<Stack spacing={4} className={styles.root}>
4744
<Margins>
48-
<div className={styles.actions}>
49-
{props.canCreateTemplate && <Button startIcon={<AddCircleOutline />}>{Language.createButton}</Button>}
50-
</div>
5145
<Table>
5246
<TableHead>
5347
<TableRow>
@@ -103,15 +97,8 @@ export const TemplatesPageView: React.FC<TemplatesPageViewProps> = (props) => {
10397
}
10498

10599
const useStyles = makeStyles((theme) => ({
106-
actions: {
100+
root: {
107101
marginTop: theme.spacing(3),
108-
marginBottom: theme.spacing(3),
109-
display: "flex",
110-
height: theme.spacing(6),
111-
112-
"& button": {
113-
marginLeft: "auto",
114-
},
115102
},
116103
welcome: {
117104
paddingTop: theme.spacing(12),

0 commit comments

Comments
 (0)