Skip to content

Commit f66f865

Browse files
committed
Ensure user is logged in when showing adapter details
1 parent b65ccda commit f66f865

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

express/frontend/src/tools/adapter/AdapterDetails.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ import {
88
useParams,
99
} from "react-router-dom";
1010
import { AdapterContextProvider } from "../../contexts/AdapterContext";
11+
import { useUserToken } from "../../contexts/UserContext";
1112

1213
const LinkRouter = (props: any) => <Link {...props} component={RouterLink} />;
1314

1415
export function AdapterDetails() {
16+
// ensure user is logged in, otherwise AdapterContextProvider will fail to load the adapter info
17+
useUserToken();
18+
1519
const matches = useMatches();
1620
const pathNames = matches[matches.length - 1].pathname
1721
.replace(/\/~.+?$/g, "")

0 commit comments

Comments
 (0)