Cleanup create realm. (#199)
This commit is contained in:
parent
52afed2b64
commit
78529f979f
3 changed files with 7 additions and 3 deletions
|
@ -49,6 +49,8 @@
|
|||
"identityProviders": "Identity providers",
|
||||
"userFederation": "User federation",
|
||||
|
||||
"required": "Required field"
|
||||
"required": "Required field",
|
||||
|
||||
"createRealm": "Create Realm"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue