How to apply loaders/spinners on a signIn button? #3593
Answered
by
ashwinkhode
ashwinkhode
asked this question in
Help
-
I want to add a spinner inside a sign in button. I looked on the internet and it seems using |
Beta Was this translation helpful? Give feedback.
Answered by
ashwinkhode
Jan 8, 2022
Replies: 1 comment
-
I found the answer! import { useSession } from "next-auth/react"
const SecretPage = () => {
const { status } = useSession({
required: true,
})
if (status === "loading") {
return <Spinner />
}
return "User is logged in!"
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
balazsorban44
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found the answer!