mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-07-04 19:21:58 +00:00
Fix bug with bad user reference in internal accounts page (#172)
This commit is contained in:
committed by
GitHub
parent
93d313b21c
commit
ce48bdc8a4
@@ -6,7 +6,7 @@ import { useServiceProviderData, deleteAccount } from "src/api";
|
||||
import { ROUTE_INTERNAL_ACCOUNTS } from "src/router/routes";
|
||||
import { Section, Icons, Spinner, SearchFilter } from "src/components";
|
||||
import { DeleteAccount } from "./delete";
|
||||
import { toastError, toastSuccess } from "src/store";
|
||||
import { toastError, toastSuccess, useSelectState } from "src/store";
|
||||
import {
|
||||
hasLength,
|
||||
hasValue,
|
||||
@@ -17,11 +17,9 @@ import { USER_ACCOUNT } from "src/api/constants";
|
||||
|
||||
import { Scope } from "src/store/types";
|
||||
import type { Account } from "src/api/types";
|
||||
import { getToken, parseJwt } from "src/router/auth";
|
||||
|
||||
export const Accounts = () => {
|
||||
const token = getToken();
|
||||
const user = parseJwt(token);
|
||||
const user = useSelectState("user");
|
||||
const [accounts, refetch] = useServiceProviderData<Account[]>("Accounts");
|
||||
const [account, setAccount] = useState<Account | null>(null);
|
||||
const [filter, setFilter] = useState("");
|
||||
|
||||
Reference in New Issue
Block a user