11import React , { useEffect , useMemo , useState } from 'react' ;
2- import { z } from 'zod' ;
32import { OrganizationList } from '@common/orgs' ;
43import { NavLink , Paper } from '@mantine/core' ;
5- import { AuthGuard } from '@ui/components/AuthGuard' ;
6- import { AppRoles } from '@common/roles' ;
74import { IconUsersGroup } from '@tabler/icons-react' ;
85import { useLocation } from 'react-router-dom' ;
96
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-
297const renderSigLink = ( org : string , index : number ) => {
8+ const color = 'light-dark(var(--mantine-color-black), var(--mantine-color-white))' ;
9+ const size = '18px' ;
3010 return (
3111 < NavLink
3212 href = { `${ useLocation ( ) . pathname } /${ org } ` }
13+ active = { index % 2 === 0 }
3314 label = { org }
15+ color = "var(--mantine-color-blue-light)"
3416 variant = "filled"
35- active = { index % 2 === 0 }
36- // color="blue"
37- // style={{
38- // // color: "lightgray",
39- // backgroundColor: "DodgerBlue",
40- // opacity: 0.5
41- // }}
4217 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+ >
4427 < span > MemberCount[{ index } ]</ span >
4528 < IconUsersGroup />
4629 </ div >
4730 }
31+ styles = { {
32+ label : {
33+ color : `${ color } ` ,
34+ fontSize : `${ size } ` ,
35+ } ,
36+ } }
4837 />
4938 ) ;
5039} ;
@@ -60,10 +49,10 @@ export const ScreenComponent: React.FC = () => {
6049 justifyContent : 'space-between' ,
6150 alignItems : 'center' ,
6251 fontWeight : 'bold' ,
63- // backgroundColor: "#f8f9fa",
6452 borderRadius : '8px' ,
6553 padding : '10px 16px' ,
6654 marginBottom : '8px' ,
55+ fontSize : '22px' ,
6756 } }
6857 >
6958 < span > Organization</ span >
@@ -73,80 +62,3 @@ export const ScreenComponent: React.FC = () => {
7362 </ >
7463 ) ;
7564} ;
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