@@ -13,7 +13,7 @@ import { AuthGuard } from '@ui/components/AuthGuard';
1313import { useApi } from '@ui/util/api' ;
1414import { AppRoles } from '@common/roles.js' ;
1515import { OrganizationList } from '@common/orgs' ;
16- import { User , UserNames , UserOrgs , Users } from '@common/types/iam' ;
16+ import { User , UserName , UserOrg } from '@common/types/iam' ;
1717
1818// const repeatOptions = ['weekly', 'biweekly'] as const;
1919
@@ -22,7 +22,7 @@ import { User, UserNames, UserOrgs, Users } from '@common/types/iam';
2222// export type EventsGetResponse = z.infer<typeof getEventsSchema>;
2323
2424export const ScreenPage : React . FC = ( ) => {
25- const [ userList , setUserList ] = useState < Users > ( [ ] ) ;
25+ const [ userList , setUserList ] = useState < User [ ] > ( [ ] ) ;
2626 const api = useApi ( 'core' ) ;
2727 const [ opened , { open, close } ] = useDisclosure ( false ) ;
2828 // const [showPrevious, { toggle: togglePrevious }] = useDisclosure(false); // Changed default to false
@@ -87,7 +87,7 @@ export const ScreenPage: React.FC = () => {
8787 // });
8888
8989 // get request for user orgs
90- const userOrgsResponse : UserOrgs = [
90+ const userOrgsResponse : UserOrg [ ] = [
9191 { netid : 'johnd01' , org : 'SIGMusic' } ,
9292 { netid : 'miker44' , org : 'SIGPLAN' } ,
9393 { netid : 'chrisb19' , org : 'SIGCHI' } ,
@@ -118,7 +118,7 @@ export const ScreenPage: React.FC = () => {
118118 ] ;
119119
120120 // retrieve from azure active directory (aad)
121- const userNamesResponse : UserNames = [
121+ const userNamesResponse : UserName [ ] = [
122122 { netid : 'johnd01' , firstName : 'John' , lastName : 'Doe' } ,
123123 { netid : 'miker44' , firstName : 'Michael' , lastName : 'Roberts' } ,
124124 { netid : 'chrisb19' , firstName : 'Christopher' , lastName : 'Brown' } ,
@@ -148,7 +148,7 @@ export const ScreenPage: React.FC = () => {
148148 { netid : 'patrickh37' , firstName : 'Patrick' , middleName : 'Henry' , lastName : 'Hill' } ,
149149 ] ;
150150
151- const mergedResponse : Users = userOrgsResponse . map ( ( orgObj ) => {
151+ const mergedResponse : User [ ] = userOrgsResponse . map ( ( orgObj ) => {
152152 const nameObj = userNamesResponse . find ( ( name ) => name . netid === orgObj . netid ) ;
153153 return { ...orgObj , ...nameObj } as User ;
154154 } ) ;
0 commit comments