7 lines
237 B
TypeScript
7 lines
237 B
TypeScript
import { useAuth } from './useAuth'
|
|
|
|
export function useIsAuthenticated(): { isAuthenticated: boolean; isLoading: boolean } {
|
|
const { data, isLoading, isError } = useAuth()
|
|
return { isAuthenticated: !!data && !isError, isLoading }
|
|
}
|