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
- // color="blue"
37
- // style={{
38
- // // color: "lightgray",
39
- // backgroundColor: "DodgerBlue",
40
- // opacity: 0.5
41
- // }}
42
17
rightSection = {
43
- < 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
+ >
44
27
< span > MemberCount[{ index } ]</ span >
45
28
< IconUsersGroup />
46
29
</ div >
47
30
}
31
+ styles = { {
32
+ label : {
33
+ color : `${ color } ` ,
34
+ fontSize : `${ size } ` ,
35
+ } ,
36
+ } }
48
37
/>
49
38
) ;
50
39
} ;
@@ -60,10 +49,10 @@ export const ScreenComponent: React.FC = () => {
60
49
justifyContent : 'space-between' ,
61
50
alignItems : 'center' ,
62
51
fontWeight : 'bold' ,
63
- // backgroundColor: "#f8f9fa",
64
52
borderRadius : '8px' ,
65
53
padding : '10px 16px' ,
66
54
marginBottom : '8px' ,
55
+ fontSize : '22px' ,
67
56
} }
68
57
>
69
58
< span > Organization</ span >
@@ -73,80 +62,3 @@ export const ScreenComponent: React.FC = () => {
73
62
</ >
74
63
) ;
75
64
} ;
76
-
77
- import { Table } from '@mantine/core' ;
78
-
79
- export const SigTable = ( ) => {
80
- const location = useLocation ( ) ;
81
- return (
82
- < Table highlightOnHover >
83
- { /* Headers */ }
84
- < thead >
85
- < tr >
86
- < th > Organization</ th >
87
- < th > Member Count</ th >
88
- </ tr >
89
- </ thead >
90
-
91
- < tbody >
92
- { OrganizationList . map ( ( org , index ) => (
93
- < tr key = { index } >
94
- { /* Organization Column */ }
95
- < td >
96
- < NavLink
97
- href = { `${ location . pathname } /${ org } ` }
98
- label = { org }
99
- variant = "filled"
100
- active = { index % 2 === 0 }
101
- />
102
- </ td >
103
-
104
- { /* Member Count Column */ }
105
- < td style = { { display : 'flex' , alignItems : 'center' , gap : '8px' } } >
106
- < span > MemberCount[{ index } ]</ span >
107
- < IconUsersGroup />
108
- </ td >
109
- </ tr >
110
- ) ) }
111
- </ tbody >
112
- { /* <tbody>
113
- {OrganizationList.map((org, index) => (
114
- <tr key={index}>
115
- <td>{renderSigLink(org, index)}</td>
116
- </tr>
117
- ))}
118
- </tbody> */ }
119
- </ Table >
120
- ) ;
121
- } ;
122
-
123
- // const navLinks = [
124
- // { label: "Home", icon: <IconHome size={16} />, path: "/" },
125
- // { label: "Profile", icon: <IconUser size={16} />, path: "/profile" },
126
- // { label: "Settings", icon: <IconSettings size={16} />, path: "/settings" },
127
- // ];
128
-
129
- // export const NavLinkTable = () => {
130
- // return (
131
- // <Table highlightOnHover>
132
- // <thead>
133
- // <tr>
134
- // <th>Navigation</th>
135
- // </tr>
136
- // </thead>
137
- // <tbody>
138
- // {navLinks.map((link, index) => (
139
- // <tr key={index}>
140
- // <td>
141
- // <NavLink
142
- // label={link.label}
143
- // component={Link} // Integrates with React Router
144
- // to={link.path}
145
- // />
146
- // </td>
147
- // </tr>
148
- // ))}
149
- // </tbody>
150
- // </Table>
151
- // );
152
- // }
0 commit comments