@@ -3,12 +3,6 @@ import AddOutlined from "@mui/icons-material/AddOutlined";
3
3
import KeyboardArrowRight from "@mui/icons-material/KeyboardArrowRight" ;
4
4
import AvatarGroup from "@mui/material/AvatarGroup" ;
5
5
import Skeleton from "@mui/material/Skeleton" ;
6
- import Table from "@mui/material/Table" ;
7
- import TableBody from "@mui/material/TableBody" ;
8
- import TableCell from "@mui/material/TableCell" ;
9
- import TableContainer from "@mui/material/TableContainer" ;
10
- import TableHead from "@mui/material/TableHead" ;
11
- import TableRow from "@mui/material/TableRow" ;
12
6
import type { Group } from "api/typesGenerated" ;
13
7
import { Avatar } from "components/Avatar/Avatar" ;
14
8
import { AvatarData } from "components/Avatar/AvatarData" ;
@@ -17,6 +11,14 @@ import { Button } from "components/Button/Button";
17
11
import { ChooseOne , Cond } from "components/Conditionals/ChooseOne" ;
18
12
import { EmptyState } from "components/EmptyState/EmptyState" ;
19
13
import { Paywall } from "components/Paywall/Paywall" ;
14
+ import {
15
+ Table ,
16
+ TableBody ,
17
+ TableCell ,
18
+ TableHead ,
19
+ TableHeader ,
20
+ TableRow ,
21
+ } from "components/Table/Table" ;
20
22
import {
21
23
TableLoaderSkeleton ,
22
24
TableRowSkeleton ,
@@ -51,55 +53,53 @@ export const GroupsPageView: FC<GroupsPageViewProps> = ({
51
53
/>
52
54
</ Cond >
53
55
< Cond >
54
- < TableContainer >
55
- < Table >
56
- < TableHead >
57
- < TableRow >
58
- < TableCell width = "50%" > Name</ TableCell >
59
- < TableCell width = "49%" > Users</ TableCell >
60
- < TableCell width = "1%" />
61
- </ TableRow >
62
- </ TableHead >
63
- < TableBody >
64
- < ChooseOne >
65
- < Cond condition = { isLoading } >
66
- < TableLoader />
67
- </ Cond >
56
+ < Table >
57
+ < TableHeader >
58
+ < TableRow >
59
+ < TableHead className = "w-1/2" > Name</ TableHead >
60
+ < TableHead className = "w-[49%]" > Users</ TableHead >
61
+ < TableHead className = "w-[1%]" />
62
+ </ TableRow >
63
+ </ TableHeader >
64
+ < TableBody >
65
+ < ChooseOne >
66
+ < Cond condition = { isLoading } >
67
+ < TableLoader />
68
+ </ Cond >
68
69
69
- < Cond condition = { isEmpty } >
70
- < TableRow >
71
- < TableCell colSpan = { 999 } >
72
- < EmptyState
73
- message = "No groups yet"
74
- description = {
75
- canCreateGroup
76
- ? "Create your first group"
77
- : "You don't have permission to create a group"
78
- }
79
- cta = {
80
- canCreateGroup && (
81
- < Button asChild >
82
- < RouterLink to = "create" >
83
- < AddOutlined />
84
- Create group
85
- </ RouterLink >
86
- </ Button >
87
- )
88
- }
89
- />
90
- </ TableCell >
91
- </ TableRow >
92
- </ Cond >
70
+ < Cond condition = { isEmpty } >
71
+ < TableRow >
72
+ < TableCell colSpan = { 999 } >
73
+ < EmptyState
74
+ message = "No groups yet"
75
+ description = {
76
+ canCreateGroup
77
+ ? "Create your first group"
78
+ : "You don't have permission to create a group"
79
+ }
80
+ cta = {
81
+ canCreateGroup && (
82
+ < Button asChild >
83
+ < RouterLink to = "create" >
84
+ < AddOutlined />
85
+ Create group
86
+ </ RouterLink >
87
+ </ Button >
88
+ )
89
+ }
90
+ />
91
+ </ TableCell >
92
+ </ TableRow >
93
+ </ Cond >
93
94
94
- < Cond >
95
- { groups ?. map ( ( group ) => (
96
- < GroupRow key = { group . id } group = { group } />
97
- ) ) }
98
- </ Cond >
99
- </ ChooseOne >
100
- </ TableBody >
101
- </ Table >
102
- </ TableContainer >
95
+ < Cond >
96
+ { groups ?. map ( ( group ) => (
97
+ < GroupRow key = { group . id } group = { group } />
98
+ ) ) }
99
+ </ Cond >
100
+ </ ChooseOne >
101
+ </ TableBody >
102
+ </ Table >
103
103
</ Cond >
104
104
</ ChooseOne >
105
105
</ >
0 commit comments