Skip to content

Commit 04e9ac1

Browse files
committed
Translate string IDs and modify props in EventDatabaseApiFeedType.template
1 parent abb1bee commit 04e9ac1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
import { React } from "react";
22
import PropTypes from "prop-types";
33
import FormInput from "../../util/forms/form-input";
4+
import { useTranslation } from "react-i18next";
45

56
const EventDatabaseApiTemplate = ({
67
handleInput,
78
formStateObject,
8-
t,
99
mode,
1010
}) => {
11+
const { t } = useTranslation("common", { keyPrefix: "feed-source-manager.dynamic-fields.event-database-api-feed-type" });
1112
return (
1213
<>
1314
<FormInput
1415
name="host"
1516
type="text"
16-
label={t("dynamic-fields.EventDatabaseApiFeedType.host")}
17+
label={t("host")}
1718
onChange={handleInput}
1819
placeholder={
1920
mode === "PUT"
20-
? t("dynamic-fields.redactedValueInputPlaceholder")
21+
? t("redacted-value-input-placeholder")
2122
: ""
2223
}
2324
value={formStateObject.host}
@@ -29,9 +30,10 @@ const EventDatabaseApiTemplate = ({
2930
EventDatabaseApiTemplate.propTypes = {
3031
handleInput: PropTypes.func,
3132
formStateObject: PropTypes.shape({
32-
host: PropTypes.string,
33+
secrets: PropTypes.shape({
34+
host: PropTypes.string,
35+
}),
3336
}),
34-
t: PropTypes.func,
3537
mode: PropTypes.string,
3638
};
3739
export default EventDatabaseApiTemplate;

0 commit comments

Comments
 (0)