diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 9ed4821..a17d54e 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -1,11 +1,11 @@ import { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; -import { useErrorHandler } from 'react-error-boundary'; +import { useErrorBoundary } from 'react-error-boundary'; import logo from '../assets/logo.svg'; export default function Footer() { const [version, setVersion] = useState('0.0.0'); - const handleError = useErrorHandler(); + const handleError = useErrorBoundary(); useEffect(() => { window.ugrc diff --git a/src/pages/About.jsx b/src/pages/About.jsx index 7be2769..63372b7 100644 --- a/src/pages/About.jsx +++ b/src/pages/About.jsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { useErrorHandler } from 'react-error-boundary'; +import { useErrorBoundary } from 'react-error-boundary'; import logo from '../assets/logo.svg'; export default function About() { @@ -12,7 +12,7 @@ export default function About() { repo: 'https://github.com/agrc/api-client', }); const history = useHistory(); - const handleError = useErrorHandler(); + const handleError = useErrorBoundary(); useEffect(() => { window.ugrc.getAppInfo().then(setInfo).catch(handleError); diff --git a/src/pages/ApiKey.jsx b/src/pages/ApiKey.jsx index db6162b..f4a5bae 100644 --- a/src/pages/ApiKey.jsx +++ b/src/pages/ApiKey.jsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { HandThumbUpIcon, HandThumbDownIcon } from '@heroicons/react/24/outline'; -import { useErrorHandler } from 'react-error-boundary'; +import { useErrorBoundary } from 'react-error-boundary'; import { useGeocodeContext } from '../components/GeocodeContext'; import { Spinner } from '../components/PageElements'; @@ -10,7 +10,7 @@ export default function ApiKey() { const history = useHistory(); const [keyStatus, setKeyStatus] = useState('unknown'); const [inputValue, setInputValue] = useState(''); - const handleError = useErrorHandler(); + const handleError = useErrorBoundary(); useEffect(() => { window.ugrc @@ -90,7 +90,7 @@ export default function ApiKey() { API Key {keyStatus === 'validating' ? : <>Next} diff --git a/src/pages/Data.jsx b/src/pages/Data.jsx index eb4e249..bfbbe0c 100644 --- a/src/pages/Data.jsx +++ b/src/pages/Data.jsx @@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from 'react'; import { Link, useHistory } from 'react-router-dom'; import { useDropzone } from 'react-dropzone'; import { DocumentPlusIcon, DocumentMinusIcon } from '@heroicons/react/24/outline'; -import { useErrorHandler } from 'react-error-boundary'; +import { useErrorBoundary } from 'react-error-boundary'; import DropzoneMessaging from '../components/DropzoneMessaging.jsx'; import FieldLinker from '../components/FieldLinker.jsx'; import { useGeocodeContext } from '../components/GeocodeContext.js'; @@ -124,7 +124,7 @@ export default function Data() { zone: [], }); const history = useHistory(); - const handleError = useErrorHandler(); + const handleError = useErrorBoundary(); useEffect(() => { window.addEventListener('keyup', (event) => { diff --git a/src/pages/Geocoding.jsx b/src/pages/Geocoding.jsx index f26a402..a1a92b5 100644 --- a/src/pages/Geocoding.jsx +++ b/src/pages/Geocoding.jsx @@ -2,7 +2,7 @@ import { useState, useEffect, useRef, useCallback } from 'react'; import { Link, Prompt } from 'react-router-dom'; import humanizeDuration from 'humanize-duration'; import { DocumentTextIcon } from '@heroicons/react/24/outline'; -import { useErrorHandler } from 'react-error-boundary'; +import { useErrorBoundary } from 'react-error-boundary'; import { useGeocodeContext } from '../components/GeocodeContext.js'; const numberFormat = new Intl.NumberFormat('en-US'); @@ -21,7 +21,7 @@ export default function Geocoding() { lastRequest: null, failures: 0, }); - const handleError = useErrorHandler(); + const handleError = useErrorBoundary(); const onDragStart = (event) => { event.preventDefault(); diff --git a/src/pages/Routes.jsx b/src/pages/Routes.jsx index 1680e9d..f1a19f7 100644 --- a/src/pages/Routes.jsx +++ b/src/pages/Routes.jsx @@ -1,7 +1,7 @@ import { useEffect } from 'react'; import { Link, withRouter, MemoryRouter as Router, Route, Switch } from 'react-router-dom'; import { useNavigatorStatus } from 'react-navigator-status'; -import { ErrorBoundary, useErrorHandler } from 'react-error-boundary'; +import { ErrorBoundary, useErrorBoundary } from 'react-error-boundary'; import GeocodeContextProvider from '../components/GeocodeContext.js'; import { ApiKey, Data, Plan, About, Geocoding, Wkid, Offline, ErrorPage } from '.'; import { Chrome, Header, Footer } from '../components/PageElements'; @@ -35,7 +35,7 @@ const pages = [ export default function Routes() { const online = useNavigatorStatus(); - const handleError = useErrorHandler(); + const handleError = useErrorBoundary(); useEffect(() => { window.addEventListener('keyup', (event) => { diff --git a/src/pages/Wkid.jsx b/src/pages/Wkid.jsx index bfb0544..1971dc7 100644 --- a/src/pages/Wkid.jsx +++ b/src/pages/Wkid.jsx @@ -2,13 +2,13 @@ import { useEffect, useState } from 'react'; import { useHistory, Link } from 'react-router-dom'; import { RadioGroup } from '@headlessui/react'; import clsx from 'clsx'; -import { useErrorHandler } from 'react-error-boundary'; +import { useErrorBoundary } from 'react-error-boundary'; export default function Wkid() { const [wkid, setWkid] = useState(''); const [customWkid, setCustomWkid] = useState(''); const history = useHistory(); - const handleError = useErrorHandler(); + const handleError = useErrorBoundary(); useEffect(() => { window.ugrc