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",
|
"identityProviders": "Identity providers",
|
||||||
"userFederation": "User federation",
|
"userFederation": "User federation",
|
||||||
|
|
||||||
"required": "Required field"
|
"required": "Required field",
|
||||||
|
|
||||||
|
"createRealm": "Create Realm"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React, { useState, useContext, useEffect } from "react";
|
import React, { useState, useContext, useEffect } from "react";
|
||||||
import { useHistory } from "react-router-dom";
|
import { useHistory } from "react-router-dom";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Dropdown,
|
Dropdown,
|
||||||
|
@ -31,6 +32,7 @@ export const RealmSelector = ({ realmList }: RealmSelectorProps) => {
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
const [filteredItems, setFilteredItems] = useState(realmList);
|
const [filteredItems, setFilteredItems] = useState(realmList);
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
const { t } = useTranslation("common");
|
||||||
|
|
||||||
const toUpperCase = (realmName: string) =>
|
const toUpperCase = (realmName: string) =>
|
||||||
realmName.charAt(0).toUpperCase() + realmName.slice(1);
|
realmName.charAt(0).toUpperCase() + realmName.slice(1);
|
||||||
|
@ -49,7 +51,7 @@ export const RealmSelector = ({ realmList }: RealmSelectorProps) => {
|
||||||
onClick={() => history.push("/add-realm")}
|
onClick={() => history.push("/add-realm")}
|
||||||
className={className}
|
className={className}
|
||||||
>
|
>
|
||||||
Create Realm
|
{t("createRealm")}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ export const NewRealmForm = () => {
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<ActionGroup>
|
<ActionGroup>
|
||||||
<Button variant="primary" type="submit">
|
<Button variant="primary" type="submit">
|
||||||
{t("create")}
|
{t("common:create")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="link">{t("common:cancel")}</Button>
|
<Button variant="link">{t("common:cancel")}</Button>
|
||||||
</ActionGroup>
|
</ActionGroup>
|
||||||
|
|
Loading…
Reference in a new issue