Show displayName
of realm on welcome page (#26562)
Closes #25897 Signed-off-by: dipeshsingh253 <sinhdipesh@gmail.com>
This commit is contained in:
parent
ed96b13312
commit
7e021730c7
1 changed files with 5 additions and 2 deletions
|
@ -54,7 +54,10 @@ import helpUrls from "../help-urls";
|
|||
const EmptyDashboard = () => {
|
||||
const { t } = useTranslation();
|
||||
const { realm } = useRealm();
|
||||
const [realmInfo, setRealmInfo] = useState<RealmRepresentation>();
|
||||
const brandImage = environment.logo ? environment.logo : "/icon.svg";
|
||||
useFetch(() => adminClient.realms.findOne({ realm }), setRealmInfo, []);
|
||||
const realmDisplayInfo = realmInfo?.displayName || realm;
|
||||
|
||||
return (
|
||||
<PageSection variant="light">
|
||||
|
@ -68,7 +71,7 @@ const EmptyDashboard = () => {
|
|||
{t("welcome")}
|
||||
</Title>
|
||||
<Title headingLevel="h1" size="4xl">
|
||||
{realm}
|
||||
{realmDisplayInfo}
|
||||
</Title>
|
||||
<EmptyStateBody>{t("introduction")}</EmptyStateBody>
|
||||
</EmptyState>
|
||||
|
@ -130,7 +133,7 @@ const Dashboard = () => {
|
|||
|
||||
useFetch(() => adminClient.realms.findOne({ realm }), setRealmInfo, []);
|
||||
|
||||
const realmDisplayInfo = realmInfo?.displayName ?? realm;
|
||||
const realmDisplayInfo = realmInfo?.displayName || realm;
|
||||
|
||||
const welcomeTab = useTab("welcome");
|
||||
const infoTab = useTab("info");
|
||||
|
|
Loading…
Reference in a new issue