11import { useQuery } from '@tanstack/react-query' ;
2- import { type ReactNode , useEffect , useState } from 'react' ;
2+ import { type FC , type ReactNode , useEffect , useState } from 'react' ;
33import { hasAuthParams , useAuth } from 'react-oidc-context' ;
44import { Alert } from './Alert.tsx' ;
55
@@ -11,7 +11,7 @@ const getMetadata = async (metadataUrl?: string) => {
1111 try {
1212 response = await fetch ( metadataUrl , {
1313 mode : 'no-cors' ,
14- headers : { accept : 'application/jwk-set+json, application/json' }
14+ headers : { accept : 'application/jwk-set+json, application/json' } ,
1515 } ) ;
1616 } catch {
1717 throw new Error ( `Unable to fetch metadataUrl\n\n${ metadataUrl } \n\nPlease confirm your auth server is up` ) ;
@@ -26,13 +26,13 @@ interface ProtectedAppProps {
2626 children : ReactNode ;
2727}
2828
29- export const ProtectedApp : React . FC < ProtectedAppProps > = ( props ) => {
29+ export const ProtectedApp : FC < ProtectedAppProps > = ( props ) => {
3030 const { children } = props ;
3131
3232 const { isPending : metadataIsPending , error : metadataError } = useQuery ( {
3333 queryKey : [ 'getMetadata' ] ,
3434 retry : false ,
35- queryFn : ( ) => getMetadata ( auth . settings . metadataUrl )
35+ queryFn : ( ) => getMetadata ( auth . settings . metadataUrl ) ,
3636 } ) ;
3737
3838 const auth = useAuth ( ) ;
0 commit comments