Unblock React Compiler for 13 components by hoisting finally blocks (#11540)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tomasz Zawadzki
2026-08-27 17:06:01 +02:00
committed by GitHub
parent c4c999ff4f
commit 296b74d781
19 changed files with 39 additions and 63 deletions
+1 -2
View File
@@ -95,9 +95,8 @@ export function Deactivated() {
logger.error(e, {
message: 'Failed to activate account',
})
} finally {
setPending(false)
}
setPending(false)
}, [_, pdsClient, refreshSession, setPending, setError, queryClient])
return (
+1 -2
View File
@@ -103,9 +103,8 @@ export function ListHiddenScreen({
msg`There was an issue. Please check your internet connection and try again.`,
),
)
} finally {
setIsProcessing(false)
}
setIsProcessing(false)
}
return (
+1 -2
View File
@@ -58,9 +58,8 @@ export const ChooseAccountForm = ({
})
// Move to login form.
onSelectAccount(account)
} finally {
setPendingDid(null)
}
setPendingDid(null)
},
[
currentAccount,
@@ -102,9 +102,8 @@ function Inner() {
logger.error('Failed to request password reset', {safeMessage: e})
setError(cleanError(e))
}
} finally {
setIsProcessing(false)
}
setIsProcessing(false)
}
const onChangePassword = async () => {
@@ -151,9 +150,8 @@ function Inner() {
logger.error('Failed to set new password', {safeMessage: e})
setError(cleanError(e))
}
} finally {
setIsProcessing(false)
}
setIsProcessing(false)
}
const onBlur = () => {
@@ -64,9 +64,8 @@ function DeactivateAccountDialogInner({
logger.error(e, {
message: 'Failed to deactivate account',
})
} finally {
setPending(false)
}
setPending(false)
}, [client, control, logoutCurrentAccount, _, setPending])
return (
@@ -49,9 +49,8 @@ export function DisableEmail2FADialog({
setStage(Stages.ConfirmCode)
} catch (e) {
setError(cleanError(String(e)))
} finally {
setIsProcessing(false)
}
setIsProcessing(false)
}
const onConfirmDisable = async () => {
@@ -80,9 +79,8 @@ export function DisableEmail2FADialog({
} else {
setError(cleanError(e))
}
} finally {
setIsProcessing(false)
}
setIsProcessing(false)
}
return (
@@ -53,9 +53,8 @@ export function ExportCarDialog({
} catch (e) {
logger.error('Error occurred while downloading CAR file', {message: e})
Toast.show(l`Error occurred while saving file`, {type: 'error'})
} finally {
setLoading(false)
}
setLoading(false)
}, [l, currentAccount, pdsClient])
const downloadChatData = useCallback(async () => {
@@ -84,9 +83,8 @@ export function ExportCarDialog({
} catch (e) {
logger.error('Error occurred while downloading chat data', {message: e})
Toast.show(l`Error occurred while saving file`, {type: 'error'})
} finally {
setLoading(false)
}
setLoading(false)
}, [l, currentAccount, chatClient])
return (
+1 -2
View File
@@ -51,9 +51,8 @@ export function StepCaptchaNative() {
} catch (err) {
const e = err as Error
logger.error(e)
} finally {
setReady(true)
}
setReady(true)
})()
}, [])
+1 -2
View File
@@ -60,9 +60,8 @@ export function SignupQueued() {
}
} catch (e: any) {
logger.error('Failed to check signup queue', {err: e.toString()})
} finally {
setProcessing(false)
}
setProcessing(false)
}, [
setProcessing,
setEstimatedTime,