-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix_ci_errors.patch
More file actions
53 lines (51 loc) · 1.46 KB
/
Copy pathfix_ci_errors.patch
File metadata and controls
53 lines (51 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<<<<<<< SEARCH
} catch (err: any) {
setStatus("error");
setErrorMsg(err.message || "Network error — please try again.");
}
};
return (
=======
} catch (err: unknown) {
setStatus("error");
setErrorMsg(err instanceof Error && err.message ? err.message : "Network error — please try again.");
}
};
return (
>>>>>>> REPLACE
<<<<<<< SEARCH
const cooldownRef = useRef(false);
=======
const [cooldown, setCooldown] = useState(false);
>>>>>>> REPLACE
<<<<<<< SEARCH
const handleSend = async () => {
if (!isValid || cooldownRef.current) return;
=======
const handleSend = async () => {
if (!isValid || cooldown) return;
>>>>>>> REPLACE
<<<<<<< SEARCH
// Rate limit
cooldownRef.current = true;
setTimeout(() => {
cooldownRef.current = false;
}, RATE_LIMIT_MS);
=======
// Rate limit
setCooldown(true);
setTimeout(() => {
setCooldown(false);
}, RATE_LIMIT_MS);
>>>>>>> REPLACE
<<<<<<< SEARCH
<button
onClick={handleSend}
disabled={!isValid || status === "sending" || cooldownRef.current}
className={`w-full py-2.5 rounded-lg text-sm font-semibold transition-all flex items-center justify-center shadow-sm ${
=======
<button
onClick={handleSend}
disabled={!isValid || status === "sending" || cooldown}
className={`w-full py-2.5 rounded-lg text-sm font-semibold transition-all flex items-center justify-center shadow-sm ${
>>>>>>> REPLACE