Mat*_*att 2 typescript reactjs
我收到 Typescript 警告:'isAuthenticated' is assigned a value but never used对于下面的组件

但是,我isAuthenticated在我的组件中使用如下所示。
import { useAuth0 } from '@auth0/auth0-react'
const Profile: React.FC = () => {
const { user, isAuthenticated, isLoading } = useAuth0()
if (isLoading) {
return <div>Loading ...</div>
}
return (
<>
isAuthenticated && (
<div>
<img src={user?.picture} alt={user?.name} />
<h2>{user?.name}</h2>
<p>{user?.email}</p>
</div>
)
</>
)
}
export default Profile
Run Code Online (Sandbox Code Playgroud)
为什么当我使用该变量时会收到此警告?