Skip to content

Commit

Permalink
Fix bbox not defined issue
Browse files Browse the repository at this point in the history
- Update turf related packages
- Add console.error on PageError
  • Loading branch information
tnagorra committed Nov 8, 2024
1 parent da10172 commit cc68ba6
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 65 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts=true
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"@sentry/react": "^7.81.1",
"@togglecorp/fujs": "^2.1.1",
"@togglecorp/re-map": "^0.2.0-beta-6",
"@turf/bbox": "^6.5.0",
"@turf/circle": "^6.5.0",
"@turf/bbox": "^7.1.0",
"@turf/circle": "^7.1.0",
"graphql": "^16.8.1",
"mapbox-gl": "^1.13.0",
"patch-package": "^8.0.0",
Expand Down
17 changes: 0 additions & 17 deletions patches/@turf+bbox+6.5.0.patch

This file was deleted.

17 changes: 0 additions & 17 deletions patches/@turf+circle+6.5.0.patch

This file was deleted.

61 changes: 36 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/App/PageError/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import { useEffect } from 'react';
import { useRouteError } from 'react-router-dom';

function PageError() {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const error = useRouteError() as unknown as any;

useEffect(
() => {
// eslint-disable-next-line no-console
console.error(error);
},
[error],
);

return (
<h1>
{error.statusText || error.message}
Expand Down
4 changes: 0 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"compilerOptions": {
"paths": {
/* Issue with turf library https://github.com/Turfjs/turf/issues/2598#issuecomment-2084656403 */
"@turf/bbox": ["./node_modules/@turf/bbox/dist/js/index.d.ts"],
"@turf/circle": ["./node_modules/@turf/circle/dist/js/index.d.ts"],

"#generated/*": ["./generated/*"],
"#assets/*": ["./src/assets/*"],
"#components/*": ["./src/components/*"],
Expand Down

0 comments on commit cc68ba6

Please sign in to comment.