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 }
3617 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+ >
3827 < span > MemberCount[{ index } ]</ span >
3928 < IconUsersGroup />
4029 </ div >
4130 }
31+ styles = { {
32+ label : {
33+ color : `${ color } ` ,
34+ fontSize : `${ size } ` ,
35+ } ,
36+ } }
4237 />
4338 ) ;
4439} ;
@@ -54,10 +49,10 @@ export const ScreenComponent: React.FC = () => {
5449 justifyContent : 'space-between' ,
5550 alignItems : 'center' ,
5651 fontWeight : 'bold' ,
57- // backgroundColor: "#f8f9fa",
5852 borderRadius : '8px' ,
5953 padding : '10px 16px' ,
6054 marginBottom : '8px' ,
55+ fontSize : '22px' ,
6156 } }
6257 >
6358 < span > Organization</ span >
@@ -67,80 +62,3 @@ export const ScreenComponent: React.FC = () => {
6762 </ >
6863 ) ;
6964} ;
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