@@ -21,11 +21,10 @@ import axios from 'axios';
2121import Layout from '../../MembershipLayout' ;
2222import successAnimation from '../../success.json' ;
2323import { useSearchParams } from 'next/navigation' ;
24- import { type IPublicClientApplication } from " @azure/msal-browser" ;
24+ import { type IPublicClientApplication } from ' @azure/msal-browser' ;
2525import { getUserAccessToken , initMsalClient } from '@/utils/msal' ;
2626import { syncIdentity } from '@/utils/api' ;
2727
28-
2928interface ErrorCode {
3029 code ?: number | string ;
3130 message : string ;
@@ -52,14 +51,14 @@ const Sync = () => {
5251 ( async ( ) => {
5352 setPca ( await initMsalClient ( ) ) ;
5453 } ) ( ) ;
55- } , [ ] )
54+ } , [ ] ) ;
5655
5756 const syncHandler = useCallback ( async ( ) => {
5857 setIsLoading ( true ) ;
5958 if ( ! pca ) {
6059 setErrorMessage ( {
6160 code : - 1 ,
62- message : " Failed to authenticate NetID."
61+ message : ' Failed to authenticate NetID.' ,
6362 } ) ;
6463 modalErrorMessage . onOpen ( ) ;
6564 return ;
@@ -68,13 +67,13 @@ const Sync = () => {
6867 if ( ! accessToken ) {
6968 setErrorMessage ( {
7069 code : - 1 ,
71- message : " Failed to authenticate NetID."
70+ message : ' Failed to authenticate NetID.' ,
7271 } ) ;
7372 modalErrorMessage . onOpen ( ) ;
7473 return ;
7574 }
7675
77- syncIdentity ( accessToken )
76+ syncIdentity ( accessToken , true )
7877 . then ( ( ) => {
7978 modalSynced . onOpen ( ) ;
8079 setIsLoading ( false ) ;
@@ -84,7 +83,7 @@ const Sync = () => {
8483 if ( error . response ) {
8584 setErrorMessage ( {
8685 code : error . response . status ,
87- message : " Failed to sync identity." ,
86+ message : ' Failed to sync identity.' ,
8887 } ) ;
8988 }
9089 } ) ;
@@ -106,7 +105,8 @@ const Sync = () => {
106105 < Divider />
107106 < CardBody className = "gap-4" >
108107 < p >
109- Only use this tool if prompted to by the ACM @ UIUC Infrastructure Team.
108+ Only use this tool if prompted to by the ACM @ UIUC Infrastructure
109+ Team.
110110 </ p >
111111 < Button
112112 color = "primary"
@@ -160,9 +160,7 @@ const Sync = () => {
160160 < ModalContent >
161161 < ModalHeader />
162162 < ModalBody className = "flex flex-col items-center" >
163- < p className = "text-center text-2xl font-bold" >
164- Identity synced!
165- </ p >
163+ < p className = "text-center text-2xl font-bold" > Identity synced!</ p >
166164 < Lottie
167165 animationData = { successAnimation }
168166 loop = { false }
0 commit comments