format
This commit is contained in:
parent
82fb002e76
commit
d7b154b656
3 changed files with 49 additions and 40 deletions
|
@ -29,7 +29,7 @@ export const GroupsCreateModal = ({
|
|||
setIsCreateModalOpen,
|
||||
createGroupName,
|
||||
setCreateGroupName,
|
||||
refresh
|
||||
refresh,
|
||||
}: GroupsCreateModalProps) => {
|
||||
const { t } = useTranslation("groups");
|
||||
const httpClient = useContext(HttpClientContext)!;
|
||||
|
@ -53,7 +53,10 @@ export const GroupsCreateModal = ({
|
|||
refresh();
|
||||
addAlert(t("groupCreated"), AlertVariant.success);
|
||||
} catch (error) {
|
||||
addAlert(`${t("couldNotCreateGroup")} ': '${error}'`, AlertVariant.danger);
|
||||
addAlert(
|
||||
`${t("couldNotCreateGroup")} ': '${error}'`,
|
||||
AlertVariant.danger
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -80,7 +80,10 @@ export const GroupsList = ({ list, refresh }: GroupsListProps) => {
|
|||
},
|
||||
{
|
||||
title: t("common:Delete"),
|
||||
onClick: async (_: React.MouseEvent<Element, MouseEvent>, rowId: number) => {
|
||||
onClick: async (
|
||||
_: React.MouseEvent<Element, MouseEvent>,
|
||||
rowId: number
|
||||
) => {
|
||||
try {
|
||||
await httpClient.doDelete(
|
||||
`/admin/realms/${realm}/groups/${list![rowId].id}`
|
||||
|
|
|
@ -102,7 +102,10 @@ export const GroupsSection = () => {
|
|||
toolbarItem={
|
||||
<>
|
||||
<ToolbarItem>
|
||||
<Button variant="primary" onClick={() => handleModalToggle()}>
|
||||
<Button
|
||||
variant="primary"
|
||||
onClick={() => handleModalToggle()}
|
||||
>
|
||||
{t("createGroup")}
|
||||
</Button>
|
||||
</ToolbarItem>
|
||||
|
|
Loading…
Reference in a new issue