File tree Expand file tree Collapse file tree 2 files changed +15
-14
lines changed
site/src/pages/TemplatesPage Expand file tree Collapse file tree 2 files changed +15
-14
lines changed Original file line number Diff line number Diff line change 1
1
import type { Interpolation , Theme } from "@emotion/react" ;
2
+ import AddIcon from "@mui/icons-material/AddOutlined" ;
3
+ import Button from "@mui/material/Button" ;
2
4
import type { FC } from "react" ;
3
5
import { Link , useNavigate , useSearchParams } from "react-router-dom" ;
4
6
import type { TemplateExample } from "api/typesGenerated" ;
@@ -23,7 +25,6 @@ import { Stack } from "components/Stack/Stack";
23
25
import { TemplateCard } from "modules/templates/TemplateCard/TemplateCard" ;
24
26
import { docs } from "utils/docs" ;
25
27
import type { TemplatesByOrg } from "utils/templateAggregators" ;
26
- import { CreateTemplateButton } from "../CreateTemplateButton" ;
27
28
import { EmptyTemplates } from "../EmptyTemplates" ;
28
29
29
30
export const Language = {
@@ -75,7 +76,17 @@ export const TemplatesPageView: FC<TemplatesPageViewProps> = ({
75
76
< Margins >
76
77
< PageHeader
77
78
actions = {
78
- canCreateTemplates && < CreateTemplateButton onNavigate = { navigate } />
79
+ canCreateTemplates && (
80
+ < Button
81
+ startIcon = { < AddIcon /> }
82
+ variant = "contained"
83
+ onClick = { ( ) => {
84
+ navigate ( "/starter-templates" ) ;
85
+ } }
86
+ >
87
+ Create Template
88
+ </ Button >
89
+ )
79
90
}
80
91
>
81
92
< PageHeaderTitle >
Original file line number Diff line number Diff line change 1
1
import type { Interpolation , Theme } from "@emotion/react" ;
2
- import AddIcon from "@mui/icons-material/AddOutlined" ;
3
2
import ArrowForwardOutlined from "@mui/icons-material/ArrowForwardOutlined" ;
4
3
import Button from "@mui/material/Button" ;
5
4
import Skeleton from "@mui/material/Skeleton" ;
@@ -44,6 +43,7 @@ import {
44
43
formatTemplateBuildTime ,
45
44
formatTemplateActiveDevelopers ,
46
45
} from "utils/templates" ;
46
+ import { CreateTemplateButton } from "../CreateTemplateButton" ;
47
47
import { EmptyTemplates } from "../EmptyTemplates" ;
48
48
49
49
export const Language = {
@@ -171,17 +171,7 @@ export const TemplatesPageView: FC<TemplatesPageViewProps> = ({
171
171
< Margins >
172
172
< PageHeader
173
173
actions = {
174
- canCreateTemplates && (
175
- < Button
176
- startIcon = { < AddIcon /> }
177
- variant = "contained"
178
- onClick = { ( ) => {
179
- navigate ( "/starter-templates" ) ;
180
- } }
181
- >
182
- Create Template
183
- </ Button >
184
- )
174
+ canCreateTemplates && < CreateTemplateButton onNavigate = { navigate } />
185
175
}
186
176
>
187
177
< PageHeaderTitle >
You can’t perform that action at this time.
0 commit comments