Skip to content

Commit 7947756

Browse files
authored
dont auto submit (#28964)
1 parent 21af119 commit 7947756

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

shared/.watchman-cookie-MBP-2019.local-559-1506

Whitespace-only changes.

shared/profile/generic/enter-username.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ const ConnectedEnterUsername = () => {
4444
const onCancel = onBack
4545

4646
const [waitingButtonKey, setWaitingButtonKey] = React.useState(0)
47+
const wasWaiting = React.useRef(false)
4748

4849
React.useEffect(() => {
49-
if (!waiting) {
50+
if (waiting) {
51+
wasWaiting.current = true
52+
} else if (wasWaiting.current) {
53+
wasWaiting.current = false
5054
onContinue()
5155
}
5256
if (error) {

0 commit comments

Comments
 (0)