1
1
import React , { useEffect , useMemo , useState } from 'react' ;
2
- import { z } from 'zod' ;
3
2
import { OrganizationList } from '@common/orgs' ;
4
3
import { NavLink , Paper } from '@mantine/core' ;
5
- import { AuthGuard } from '@ui/components/AuthGuard' ;
6
- import { AppRoles } from '@common/roles' ;
7
4
import { IconUsersGroup } from '@tabler/icons-react' ;
8
5
import { useLocation } from 'react-router-dom' ;
9
6
10
- // use personn icon
11
- // import { IconPlus, IconTrash } from '@tabler/icons-react';
12
-
13
- // const OrganizationListEnum = z.enum(OrganizationList);
14
-
15
- // const renderTableRow = (org: string) => {
16
- // const count = 50;
17
- // return(
18
- // <Transition mounted={true} transition="fade" duration={400} timingFunction="ease">
19
- // {(styles) => (
20
- // <tr style={{ ...styles, display: 'table-row' }}>
21
- // <Table.Td>{org}</Table.Td>
22
- // <Table.Td>{count}</Table.Td>
23
- // </tr>
24
- // )}
25
- // </Transition>
26
- // )
27
- // }
28
-
29
7
const renderSigLink = ( org : string , index : number ) => {
8
+ const color = 'light-dark(var(--mantine-color-black), var(--mantine-color-white))' ;
9
+ const size = '18px' ;
30
10
return (
31
11
< NavLink
32
12
href = { `${ useLocation ( ) . pathname } /${ org } ` }
13
+ active = { index % 2 === 0 }
33
14
label = { org }
15
+ color = "var(--mantine-color-blue-light)"
34
16
variant = "filled"
35
- active = { index % 2 === 0 }
36
17
rightSection = {
37
- < div style = { { display : 'flex' , alignItems : 'center' , gap : '4px' } } >
18
+ < div
19
+ style = { {
20
+ display : 'flex' ,
21
+ alignItems : 'center' ,
22
+ gap : '4px' ,
23
+ color : `${ color } ` ,
24
+ fontSize : `${ size } ` ,
25
+ } }
26
+ >
38
27
< span > MemberCount[{ index } ]</ span >
39
28
< IconUsersGroup />
40
29
</ div >
41
30
}
31
+ styles = { {
32
+ label : {
33
+ color : `${ color } ` ,
34
+ fontSize : `${ size } ` ,
35
+ } ,
36
+ } }
42
37
/>
43
38
) ;
44
39
} ;
@@ -54,10 +49,10 @@ export const ScreenComponent: React.FC = () => {
54
49
justifyContent : 'space-between' ,
55
50
alignItems : 'center' ,
56
51
fontWeight : 'bold' ,
57
- // backgroundColor: "#f8f9fa",
58
52
borderRadius : '8px' ,
59
53
padding : '10px 16px' ,
60
54
marginBottom : '8px' ,
55
+ fontSize : '22px' ,
61
56
} }
62
57
>
63
58
< span > Organization</ span >
@@ -67,80 +62,3 @@ export const ScreenComponent: React.FC = () => {
67
62
</ >
68
63
) ;
69
64
} ;
70
-
71
- import { Table } from '@mantine/core' ;
72
-
73
- export const SigTable = ( ) => {
74
- const location = useLocation ( ) ;
75
- return (
76
- < Table highlightOnHover >
77
- { /* Headers */ }
78
- < thead >
79
- < tr >
80
- < th > Organization</ th >
81
- < th > Member Count</ th >
82
- </ tr >
83
- </ thead >
84
-
85
- < tbody >
86
- { OrganizationList . map ( ( org , index ) => (
87
- < tr key = { index } >
88
- { /* Organization Column */ }
89
- < td >
90
- < NavLink
91
- href = { `${ location . pathname } /${ org } ` }
92
- label = { org }
93
- variant = "filled"
94
- active = { index % 2 === 0 }
95
- />
96
- </ td >
97
-
98
- { /* Member Count Column */ }
99
- < td style = { { display : 'flex' , alignItems : 'center' , gap : '8px' } } >
100
- < span > MemberCount[{ index } ]</ span >
101
- < IconUsersGroup />
102
- </ td >
103
- </ tr >
104
- ) ) }
105
- </ tbody >
106
- { /* <tbody>
107
- {OrganizationList.map((org, index) => (
108
- <tr key={index}>
109
- <td>{renderSigLink(org, index)}</td>
110
- </tr>
111
- ))}
112
- </tbody> */ }
113
- </ Table >
114
- ) ;
115
- } ;
116
-
117
- // const navLinks = [
118
- // { label: "Home", icon: <IconHome size={16} />, path: "/" },
119
- // { label: "Profile", icon: <IconUser size={16} />, path: "/profile" },
120
- // { label: "Settings", icon: <IconSettings size={16} />, path: "/settings" },
121
- // ];
122
-
123
- // export const NavLinkTable = () => {
124
- // return (
125
- // <Table highlightOnHover>
126
- // <thead>
127
- // <tr>
128
- // <th>Navigation</th>
129
- // </tr>
130
- // </thead>
131
- // <tbody>
132
- // {navLinks.map((link, index) => (
133
- // <tr key={index}>
134
- // <td>
135
- // <NavLink
136
- // label={link.label}
137
- // component={Link} // Integrates with React Router
138
- // to={link.path}
139
- // />
140
- // </td>
141
- // </tr>
142
- // ))}
143
- // </tbody>
144
- // </Table>
145
- // );
146
- // }
0 commit comments