Skip to content

Commit

Permalink
Merge pull request #206 from ambujraj/205-send-button-disabled-on-logout
Browse files Browse the repository at this point in the history
Fixed send button disabled issue
  • Loading branch information
ambujraj authored May 3, 2024
2 parents a7aea43 + 865a7d6 commit 451ee89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/src/app/(pages)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default function Home() {
const [progress, setProgress] = useState(0)
const [uploading, setUploading] = useState(false)
const [uploaded, setUploaded] = useState(false)
const [sendDisabled, setSendDisabled] = useState(true)
const [postProcessing, setPostProcessing] = useState(false)
const [willShareEmail, setWillShareEmail] = useState(false)
const [shareURL, setShareURL] = useState('')
Expand Down Expand Up @@ -88,7 +89,10 @@ export default function Home() {
setUserEmail(userResponse.email)
setUserName(userResponse.name)
}
}).finally(() => {
setSendDisabled(false)
})

}
}, [statusLoaded, router])

Expand Down Expand Up @@ -503,7 +507,7 @@ export default function Home() {
<Button
className="group animate-bounce font-semibold text-3xl shadow-2 py-10 bg-primary text-gray-100 hover:pointer hover:bg-blue-900 hover:text-white rounded-2xl hover:animate-none hover:opacity-80"
onClick={() => handleSend()}
disabled={!user || !statusLoaded}
disabled={sendDisabled}
>
SEND
<span>
Expand Down

0 comments on commit 451ee89

Please sign in to comment.