fix(web): unauthorized errors (#320)

- fix(ErrorPage): add padding to the page for mobile devices

- chore(react-query): wrap APIClient calls in anonymous functions to avoid passing react-query context variables by accident

- fix incorrect ordering of ErrorBoundary and QueryClientProvider (ErrorBoundary is now the parent)
This commit is contained in:
stacksmash76 2022-06-22 22:26:53 +02:00 committed by GitHub
parent aa500fd13d
commit c4efbd6e20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 28 additions and 26 deletions

View file

@ -10,10 +10,10 @@ import { componentMapType } from "../../forms/settings/DownloadClientForms";
function NotificationSettings() {
const [addNotificationsIsOpen, toggleAddNotifications] = useToggle(false);
const { data } = useQuery<Notification[], Error>("notifications", APIClient.notifications.getAll,
{
refetchOnWindowFocus: false
}
const { data } = useQuery(
"notifications",
() => APIClient.notifications.getAll(),
{ refetchOnWindowFocus: false }
);
return (