diff --git a/src/user/UserConsents.tsx b/src/user/UserConsents.tsx
index c2eb778562..96026ef79b 100644
--- a/src/user/UserConsents.tsx
+++ b/src/user/UserConsents.tsx
@@ -1,7 +1,7 @@
-import React from "react";
+import React, { useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import { useTranslation } from "react-i18next";
-import { PageSection } from "@patternfly/react-core";
+import { Button, Label, PageSection } from "@patternfly/react-core";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { emptyFormatter } from "../util";
@@ -27,10 +27,31 @@ export const UserConsents = () => {
return alphabetize(consents);
};
+ const [labelClicked, setLabelClicked] = useState(false);
+
+ useEffect(() => {
+ console.log(labelClicked)
+ }, [labelClicked])
+
const clientScopesRenderer = ({
grantedClientScopes,
}: UserConsentRepresentation) => {
- return <>{grantedClientScopes!.join(", ")}>;
+ if (grantedClientScopes!.length <= 5 && labelClicked) {
+ return <>{grantedClientScopes!.join(", ")}>;
+ } else
+ return (
+ <>
+ {grantedClientScopes!.slice(1, 6).join(", ")}{" "}
+
+ >
+ );
};
const createdRenderer = ({ createDate }: UserConsentRepresentation) => {
@@ -45,50 +66,49 @@ export const UserConsents = () => {
return (
<>
-
- {}}
- />
- }
- />
-
+ {}}
+ />
+ }
+ />
>
);
};
diff --git a/src/user/UsersTabs.tsx b/src/user/UsersTabs.tsx
index 698897b22b..169e634149 100644
--- a/src/user/UsersTabs.tsx
+++ b/src/user/UsersTabs.tsx
@@ -108,9 +108,7 @@ export const UsersTabs = () => {
data-testid="user-consents-tab"
title={{t("users:consents")}}
>
-
-
-
+
)}
diff --git a/src/user/user-section.css b/src/user/user-section.css
index c28f7cbcfd..1c3a2173d4 100644
--- a/src/user/user-section.css
+++ b/src/user/user-section.css
@@ -45,3 +45,7 @@ td.pf-c-table__check > input {
width: 20px;
vertical-align: text-top;
}
+
+.pf-c-toolbar__content-section {
+ margin-bottom: calc(var(--pf-global--spacer--lg) * -1);
+}