@@ -2,12 +2,6 @@ import type { Interpolation, Theme } from "@emotion/react";
2
2
import ArrowForwardOutlined from "@mui/icons-material/ArrowForwardOutlined" ;
3
3
import MuiButton from "@mui/material/Button" ;
4
4
import Skeleton from "@mui/material/Skeleton" ;
5
- import Table from "@mui/material/Table" ;
6
- import TableBody from "@mui/material/TableBody" ;
7
- import TableCell from "@mui/material/TableCell" ;
8
- import TableContainer from "@mui/material/TableContainer" ;
9
- import TableHead from "@mui/material/TableHead" ;
10
- import TableRow from "@mui/material/TableRow" ;
11
5
import { hasError , isApiValidationError } from "api/errors" ;
12
6
import type { Template , TemplateExample } from "api/typesGenerated" ;
13
7
import { ErrorAlert } from "components/Alert/ErrorAlert" ;
@@ -33,6 +27,14 @@ import {
33
27
PageHeaderTitle ,
34
28
} from "components/PageHeader/PageHeader" ;
35
29
import { Stack } from "components/Stack/Stack" ;
30
+ import {
31
+ Table ,
32
+ TableBody ,
33
+ TableCell ,
34
+ TableHead ,
35
+ TableHeader ,
36
+ TableRow ,
37
+ } from "components/Table/Table" ;
36
38
import {
37
39
TableLoaderSkeleton ,
38
40
TableRowSkeleton ,
@@ -231,41 +233,41 @@ export const TemplatesPageView: FC<TemplatesPageViewProps> = ({
231
233
< ErrorAlert error = { error } />
232
234
) }
233
235
234
- < TableContainer >
235
- < Table >
236
- < TableHead >
237
- < TableRow >
238
- < TableCell width = "35%" > { Language . nameLabel } </ TableCell >
239
- < TableCell width = "15%" >
240
- { showOrganizations ? "Organization" : Language . usedByLabel }
241
- </ TableCell >
242
- < TableCell width = "10%" > { Language . buildTimeLabel } </ TableCell >
243
- < TableCell width = "15%" > { Language . lastUpdatedLabel } </ TableCell >
244
- < TableCell width = "1%" />
245
- </ TableRow >
246
- </ TableHead >
247
- < TableBody >
248
- { isLoading && < TableLoader /> }
236
+ < Table >
237
+ < TableHeader >
238
+ < TableRow >
239
+ < TableHead className = "w-[35%]" > { Language . nameLabel } </ TableHead >
240
+ < TableHead className = "w-[15%]" >
241
+ { showOrganizations ? "Organization" : Language . usedByLabel }
242
+ </ TableHead >
243
+ < TableHead className = "w-[10%]" > { Language . buildTimeLabel } </ TableHead >
244
+ < TableHead className = "w-[15%]" >
245
+ { Language . lastUpdatedLabel }
246
+ </ TableHead >
247
+ < TableHead className = "w-[1%]" />
248
+ </ TableRow >
249
+ </ TableHeader >
250
+ < TableBody >
251
+ { isLoading && < TableLoader /> }
249
252
250
- { isEmpty ? (
251
- < EmptyTemplates
252
- canCreateTemplates = { canCreateTemplates }
253
- examples = { examples ?? [ ] }
254
- isUsingFilter = { filter . used }
253
+ { isEmpty ? (
254
+ < EmptyTemplates
255
+ canCreateTemplates = { canCreateTemplates }
256
+ examples = { examples ?? [ ] }
257
+ isUsingFilter = { filter . used }
258
+ />
259
+ ) : (
260
+ templates ?. map ( ( template ) => (
261
+ < TemplateRow
262
+ key = { template . id }
263
+ showOrganizations = { showOrganizations }
264
+ template = { template }
265
+ workspacePermissions = { workspacePermissions }
255
266
/>
256
- ) : (
257
- templates ?. map ( ( template ) => (
258
- < TemplateRow
259
- key = { template . id }
260
- showOrganizations = { showOrganizations }
261
- template = { template }
262
- workspacePermissions = { workspacePermissions }
263
- />
264
- ) )
265
- ) }
266
- </ TableBody >
267
- </ Table >
268
- </ TableContainer >
267
+ ) )
268
+ ) }
269
+ </ TableBody >
270
+ </ Table >
269
271
</ Margins >
270
272
) ;
271
273
} ;
0 commit comments