You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-24 23:01:05 +03:00
Error boundary (#1743)
* reinstate link to browser session detail * add util hook for unwrapping current browser session id * fix bug in compatsessiondetail createdAt -> finishedAt * browser session detail page * tweak naming * add ErrorBoundary * useCurrentBrowserSessionId throw when error * add ErrorBoundary to pages * throw errors instead of rendering error * add unwrap util
This commit is contained in:
@@ -16,6 +16,7 @@ import { useAtomValue } from "jotai";
|
||||
import { atomWithQuery } from "jotai-urql";
|
||||
|
||||
import { mapQueryAtom } from "../atoms";
|
||||
import ErrorBoundary from "../components/ErrorBoundary";
|
||||
import GraphQLError from "../components/GraphQLError";
|
||||
import NotLoggedIn from "../components/NotLoggedIn";
|
||||
import UserSessionsOverview from "../components/UserSessionsOverview";
|
||||
@@ -54,7 +55,11 @@ const SessionsOverview: React.FC = () => {
|
||||
const data = unwrapOk(result);
|
||||
if (data === null) return <NotLoggedIn />;
|
||||
|
||||
return <UserSessionsOverview user={data} />;
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<UserSessionsOverview user={data} />
|
||||
</ErrorBoundary>
|
||||
);
|
||||
};
|
||||
|
||||
export default SessionsOverview;
|
||||
|
||||
Reference in New Issue
Block a user