no spinner when no have rights for realm load (#2515)
* no spinner when no have rights for realm load fixes: #2504 * fixed empty state note * default to search user * Update public/resources/en/users.json Co-authored-by: Stan Silvert <ssilvert@redhat.com>
This commit is contained in:
parent
60a81c8e86
commit
ee6f2f4a7d
2 changed files with 4 additions and 8 deletions
|
@ -4,7 +4,7 @@
|
||||||
"userList": "User list",
|
"userList": "User list",
|
||||||
"searchForUser": "Search user",
|
"searchForUser": "Search user",
|
||||||
"startBySearchingAUser": "Start by searching for users",
|
"startBySearchingAUser": "Start by searching for users",
|
||||||
"searchForUserDescription": "This realm has a federated provider. Viewing all users may cause the system to slow down. Please search for a user above.",
|
"searchForUserDescription": "This realm may have a federated provider. Viewing all users may cause the system to slow down, but it can be done by searching for \"*\". Please search for a user above.",
|
||||||
"createUser": "Create user",
|
"createUser": "Create user",
|
||||||
"createNewUser": "Create new user",
|
"createNewUser": "Create new user",
|
||||||
"noUsersFound": "No users found",
|
"noUsersFound": "No users found",
|
||||||
|
|
|
@ -69,7 +69,7 @@ export default function UsersSection() {
|
||||||
const [kebabOpen, setKebabOpen] = useState(false);
|
const [kebabOpen, setKebabOpen] = useState(false);
|
||||||
const [selectedRows, setSelectedRows] = useState<UserRepresentation[]>([]);
|
const [selectedRows, setSelectedRows] = useState<UserRepresentation[]>([]);
|
||||||
|
|
||||||
const [key, setKey] = useState("");
|
const [key, setKey] = useState(0);
|
||||||
const refresh = () => setKey(key + 1);
|
const refresh = () => setKey(key + 1);
|
||||||
|
|
||||||
useFetch(
|
useFetch(
|
||||||
|
@ -84,7 +84,7 @@ export default function UsersSection() {
|
||||||
adminClient.realms.findOne({ realm: realmName }),
|
adminClient.realms.findOne({ realm: realmName }),
|
||||||
]);
|
]);
|
||||||
} catch {
|
} catch {
|
||||||
return [[], undefined] as [
|
return [[{}], undefined] as [
|
||||||
ComponentRepresentation[],
|
ComponentRepresentation[],
|
||||||
RealmRepresentation | undefined
|
RealmRepresentation | undefined
|
||||||
];
|
];
|
||||||
|
@ -281,10 +281,6 @@ export default function UsersSection() {
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!realm) {
|
|
||||||
return <KeycloakSpinner />;
|
|
||||||
}
|
|
||||||
|
|
||||||
const route = (tab: UserTab) =>
|
const route = (tab: UserTab) =>
|
||||||
routableTab({
|
routableTab({
|
||||||
to: toUsers({
|
to: toUsers({
|
||||||
|
|
Loading…
Reference in a new issue