11import React , { useEffect , useMemo , useState } from 'react' ;
22import { z } from 'zod' ;
33import { OrganizationList } from '@common/orgs' ;
4- import { NavLink } from '@mantine/core' ;
4+ import { NavLink , Paper } from '@mantine/core' ;
55import { AuthGuard } from '@ui/components/AuthGuard' ;
66import { AppRoles } from '@common/roles' ;
77import { IconUsersGroup } from '@tabler/icons-react' ;
@@ -31,7 +31,14 @@ const renderSigLink = (org: string, index: number) => {
3131 < NavLink
3232 href = { `${ useLocation ( ) . pathname } /${ org } ` }
3333 label = { org }
34+ variant = "filled"
3435 active = { index % 2 === 0 }
36+ // color="blue"
37+ // style={{
38+ // // color: "lightgray",
39+ // backgroundColor: "DodgerBlue",
40+ // opacity: 0.5
41+ // }}
3542 rightSection = {
3643 < div style = { { display : 'flex' , alignItems : 'center' , gap : '4px' } } >
3744 < span > MemberCount[{ index } ]</ span >
@@ -43,5 +50,103 @@ const renderSigLink = (org: string, index: number) => {
4350} ;
4451
4552export const ScreenComponent : React . FC = ( ) => {
46- return < > { OrganizationList . map ( renderSigLink ) } </ > ;
53+ return (
54+ < >
55+ < Paper
56+ shadow = "xs"
57+ p = "sm"
58+ style = { {
59+ display : 'flex' ,
60+ justifyContent : 'space-between' ,
61+ alignItems : 'center' ,
62+ fontWeight : 'bold' ,
63+ // backgroundColor: "#f8f9fa",
64+ borderRadius : '8px' ,
65+ padding : '10px 16px' ,
66+ marginBottom : '8px' ,
67+ } }
68+ >
69+ < span > Organization</ span >
70+ < span > Member Count</ span >
71+ </ Paper >
72+ { OrganizationList . map ( renderSigLink ) }
73+ </ >
74+ ) ;
4775} ;
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