fix(#2981): runtime error when enabling 2fa

This commit is contained in:
Amruth Pillai
2026-05-07 21:23:53 +02:00
parent a43538c919
commit 023cb4a594
72 changed files with 17 additions and 735 deletions
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/utils/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158664889981519,"mode":420,"is_dir":false}},"order":["packages/utils/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"0c7a15dde9d26988","duration":955,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
{"hash":"18315d11067e0830","duration":9205,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"ee0217b2e9df145b45e6731ac512d88ad59406eee553ed1b197bdf1eef2d5689"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/env/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158665081126046,"mode":420,"is_dir":false}},"order":["packages/env/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"24552bdffdc5ebcb","duration":1146,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/fonts/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158665816497121,"mode":420,"is_dir":false}},"order":["packages/fonts/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"2c1f239ac1e9bd96","duration":1882,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/import/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158667091029787,"mode":420,"is_dir":false}},"order":["packages/import/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"5fff137e287b47d8","duration":3154,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"apps/web/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158668660018078,"mode":420,"is_dir":false}},"order":["apps/web/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"6711a052e760da9a","duration":3049,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/ui/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158666985313670,"mode":420,"is_dir":false}},"order":["packages/ui/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"72c3ccc9f2f5feed","duration":3048,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/scripts/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158665609656007,"mode":420,"is_dir":false}},"order":["packages/scripts/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"7ad6f44ecc30113b","duration":1673,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/schema/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158666036371217,"mode":420,"is_dir":false}},"order":["packages/schema/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"8ac845ee07e175fc","duration":2102,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/auth/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158667978449652,"mode":420,"is_dir":false}},"order":["packages/auth/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"a1fc5770a21706e7","duration":2896,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/email/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158665401936928,"mode":420,"is_dir":false}},"order":["packages/email/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"b5f38c54fffff57f","duration":1465,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/db/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158666974087786,"mode":420,"is_dir":false}},"order":["packages/db/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"b849023dfa3fccd9","duration":3037,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
{"hash":"baf3349509c6078b","duration":10422,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"d2396996b2d0bdfaf37211bb596304c9daba172ce6f30ef038c35f558dc27c1e"}
Binary file not shown.
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
{"hash":"c747964dd160f1ea","duration":12224,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"e19f2793896093dc74f2a4eb044a4b4d3eb636c2509fb38e823941865cdf28e3"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/ai/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158666319285663,"mode":420,"is_dir":false}},"order":["packages/ai/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"e1524476910e6054","duration":2383,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/api/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158668358064434,"mode":420,"is_dir":false}},"order":["packages/api/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"e956e719e41d711e","duration":2955,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"files":{"packages/pdf/.turbo/turbo-typecheck.log":{"size":29,"mtime_nanos":1778158667367331180,"mode":420,"is_dir":false}},"order":["packages/pdf/.turbo/turbo-typecheck.log"]}
-1
View File
@@ -1 +0,0 @@
{"hash":"fe9e2236067e95bd","duration":2476,"sha":"1b345014be41f65c6fe7ac9f42ddef9ef3a8575c","dirty_hash":"5c14d1e7f0f28737d20df1e16b72d63386130eec2a28a7842a26eab88a949a82"}
Binary file not shown.
-4
View File
@@ -1,4 +0,0 @@
{
"is_task_list_visible": true,
"active_task": null
}
File diff suppressed because one or more lines are too long
-2
View File
@@ -1,2 +0,0 @@
$ tsgo --noEmit
-1
View File
@@ -1 +0,0 @@
2
-1
View File
@@ -1 +0,0 @@
36670
-1
View File
@@ -1 +0,0 @@
1
+8 -3
View File
@@ -1,6 +1,6 @@
import { t } from "@lingui/core/macro";
import { useStore } from "@tanstack/react-form";
import { useCallback, useEffect } from "react";
import { useCallback, useEffect, useRef } from "react";
import { useDialogStore } from "@/dialogs/store";
import { useConfirm } from "@/hooks/use-confirm";
@@ -37,11 +37,16 @@ export function useFormBlocker<TStore extends BlockableFormStore>(
const isDirty = useStore(form.store, (state) => state.isDirty);
const isSubmitting = useStore(form.store, (state) => state.isSubmitting);
const shouldBlockRef = useRef(options?.shouldBlock);
useEffect(() => {
shouldBlockRef.current = options?.shouldBlock;
}, [options?.shouldBlock]);
const shouldBlock = useCallback(() => {
if (options?.shouldBlock) return options.shouldBlock();
if (shouldBlockRef.current) return shouldBlockRef.current();
return isDirty && !isSubmitting;
}, [options, isDirty, isSubmitting]);
}, [isDirty, isSubmitting]);
const confirmClose = useCallback(async () => {
if (!shouldBlock()) return true;
-2
View File
@@ -1,2 +0,0 @@
$ tsgo --noEmit
-2
View File
@@ -1,2 +0,0 @@
$ tsgo --noEmit
-2
View File
@@ -1,2 +0,0 @@
$ tsgo --noEmit
-2
View File
@@ -1,2 +0,0 @@
$ tsgo --noEmit
@@ -1,2 +0,0 @@
$ tsgo --noEmit
-2
View File
@@ -1,2 +0,0 @@
$ tsgo --noEmit
@@ -1,2 +0,0 @@
$ tsgo --noEmit
@@ -1,2 +0,0 @@
$ tsgo --noEmit
-2
View File
@@ -1,2 +0,0 @@
$ tsgo --noEmit
@@ -1,2 +0,0 @@
$ tsgo --noEmit
@@ -1,2 +0,0 @@
$ tsgo --noEmit
-2
View File
@@ -1,2 +0,0 @@
$ tsgo --noEmit
@@ -1,2 +0,0 @@
$ tsgo --noEmit
+9 -9
View File
@@ -6056,8 +6056,8 @@ packages:
resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==}
engines: {node: '>=12.0.0'}
express-rate-limit@8.5.0:
resolution: {integrity: sha512-XKhFohWaSBdVJNTi5TaHziqnPkv04I9UQV6q1Wy7Ui6GGQZVW12ojDFwqer14EvCXxjvPG0CyWXx7cAXpALB4Q==}
express-rate-limit@8.5.1:
resolution: {integrity: sha512-5O6KYmyJEpuPJV5hNTXKbAHWRqrzyu+OI3vUnSd2kXFubIVpG7ezpgxQy76Zo5GQZtrQBg86hF+CM/NX+cioiQ==}
engines: {node: '>= 16'}
peerDependencies:
express: '>= 4.11'
@@ -6465,8 +6465,8 @@ packages:
resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==}
engines: {node: '>= 0.4'}
ip-address@10.1.0:
resolution: {integrity: sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==}
ip-address@10.2.0:
resolution: {integrity: sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==}
engines: {node: '>= 12'}
ipaddr.js@1.9.1:
@@ -11089,7 +11089,7 @@ snapshots:
eventsource: 3.0.7
eventsource-parser: 3.0.8
express: 5.2.1
express-rate-limit: 8.5.0(express@5.2.1)
express-rate-limit: 8.5.1(express@5.2.1)
hono: 4.12.18
jose: 6.2.3
json-schema-typed: 8.0.2
@@ -11111,7 +11111,7 @@ snapshots:
eventsource: 3.0.7
eventsource-parser: 3.0.8
express: 5.2.1
express-rate-limit: 8.5.0(express@5.2.1)
express-rate-limit: 8.5.1(express@5.2.1)
hono: 4.12.18
jose: 6.2.3
json-schema-typed: 8.0.2
@@ -14349,10 +14349,10 @@ snapshots:
expect-type@1.3.0: {}
express-rate-limit@8.5.0(express@5.2.1):
express-rate-limit@8.5.1(express@5.2.1):
dependencies:
express: 5.2.1
ip-address: 10.1.0
ip-address: 10.2.0
express@5.2.1:
dependencies:
@@ -14793,7 +14793,7 @@ snapshots:
hasown: 2.0.3
side-channel: 1.1.0
ip-address@10.1.0: {}
ip-address@10.2.0: {}
ipaddr.js@1.9.1: {}