Skip to content

Commit c336f3b

Browse files
HOTFIX: restored missing timeouts.ts and updated tsconfig (#184)
1 parent b5b3057 commit c336f3b

8 files changed

Lines changed: 31 additions & 7 deletions

File tree

frontend/package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"@types/react-dom": "^18.2.17",
8181
"@typescript-eslint/eslint-plugin": "^8.18.1",
8282
"@typescript-eslint/parser": "^8.18.1",
83+
"baseline-browser-mapping": "^2.9.19",
8384
"eslint": "^9.0.0",
8485
"eslint-config-next": "^15.5.9",
8586
"eslint-config-prettier": "^9.0.0",

frontend/src/app/api/fcc-lookup/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function GET(request: Request) {
4646
const fccUrl = `https://geo.fcc.gov/api/census/block/find?${params.toString()}`;
4747

4848
const fccResponse = await fetch(fccUrl, {
49-
signal: AbortSignal.timeout(LOCATION_FETCH_TIMEOUT), //5000
49+
signal: AbortSignal.timeout(LOCATION_FETCH_TIMEOUT),
5050
});
5151
if (!fccResponse.ok) {
5252
return NextResponse.json(

frontend/src/config/timeouts.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Timeout configurations for various API calls and UI operations (in milliseconds)
3+
*/
4+
5+
/** Timeout for undo notification display - 7.5 seconds */
6+
export const UNDO_NOTIFICATION_TIMEOUT = 7500;
7+
8+
/** Timeout for email sending requests - 5 minutes */
9+
export const EMAIL_TIMEOUT = 300_000;
10+
11+
/** Timeout for action plan generation - 2 minutes */
12+
export const ACTION_PLAN_TIMEOUT = 120_000;
13+
14+
/** Timeout for streaming requests - 10 minutes */
15+
export const STREAMING_TIMEOUT = 600_000;
16+
17+
/** Timeout for FCC location lookup requests - 5 seconds */
18+
export const LOCATION_FETCH_TIMEOUT = 5000;
19+
20+
/** Timeout for "No resources found" message - 12 seconds */
21+
export const NO_RESOURCES_TIMEOUT = 12_000;

frontend/src/hooks/useResourceRemoval.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function useResourceRemoval(): UseResourceRemovalReturn {
4545
return current;
4646
});
4747
setRemovedResourceIndex(null);
48-
}, UNDO_NOTIFICATION_TIMEOUT); //7500
48+
}, UNDO_NOTIFICATION_TIMEOUT);
4949
},
5050
[],
5151
);

frontend/src/util/emailResult.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export async function emailResult(
3434
};
3535

3636
const ac = new AbortController();
37-
const timer = setTimeout(() => ac.abort(), EMAIL_TIMEOUT); //300_000
37+
const timer = setTimeout(() => ac.abort(), EMAIL_TIMEOUT);
3838

3939
try {
4040
const response = await fetch(url, {

frontend/src/util/fetchActionPlan.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export async function fetchActionPlan(
4646
};
4747

4848
const ac = new AbortController();
49-
const timer = setTimeout(() => ac.abort(), ACTION_PLAN_TIMEOUT); //120_000
49+
const timer = setTimeout(() => ac.abort(), ACTION_PLAN_TIMEOUT);
5050

5151
try {
5252
const requestBody: {

frontend/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"include": [
3030
"next-env.d.ts",
3131
"src/**/*",
32+
"components/**/*",
3233
"stories/**/*",
3334
"tests/**/*",
3435
"__mocks__/**/*",

0 commit comments

Comments
 (0)