Cleanup create realm. (#199)

This commit is contained in:
Stan Silvert 2020-10-29 14:56:52 -04:00 committed by GitHub
parent 52afed2b64
commit 78529f979f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View file

@ -49,6 +49,8 @@
"identityProviders": "Identity providers",
"userFederation": "User federation",
"required": "Required field"
"required": "Required field",
"createRealm": "Create Realm"
}
}

View file

@ -1,5 +1,6 @@
import React, { useState, useContext, useEffect } from "react";
import { useHistory } from "react-router-dom";
import { useTranslation } from "react-i18next";
import {
Dropdown,
@ -31,6 +32,7 @@ export const RealmSelector = ({ realmList }: RealmSelectorProps) => {
const [search, setSearch] = useState("");
const [filteredItems, setFilteredItems] = useState(realmList);
const history = useHistory();
const { t } = useTranslation("common");
const toUpperCase = (realmName: string) =>
realmName.charAt(0).toUpperCase() + realmName.slice(1);
@ -49,7 +51,7 @@ export const RealmSelector = ({ realmList }: RealmSelectorProps) => {
onClick={() => history.push("/add-realm")}
className={className}
>
Create Realm
{t("createRealm")}
</Button>
);

View file

@ -82,7 +82,7 @@ export const NewRealmForm = () => {
</FormGroup>
<ActionGroup>
<Button variant="primary" type="submit">
{t("create")}
{t("common:create")}
</Button>
<Button variant="link">{t("common:cancel")}</Button>
</ActionGroup>