diff --git a/client/src/core/client/admin/components/ModerationReason/DetailedExplanation.tsx b/client/src/core/client/admin/components/ModerationReason/DetailedExplanation.tsx index 8c9ec0774a..1efcc1e8e5 100644 --- a/client/src/core/client/admin/components/ModerationReason/DetailedExplanation.tsx +++ b/client/src/core/client/admin/components/ModerationReason/DetailedExplanation.tsx @@ -13,9 +13,11 @@ import styles from "./DetailedExplanation.css"; import commonStyles from "./ModerationReason.css"; export interface Props { - onChange: (value: string) => void; + onChangeExplanation: (value: string) => void; + onChangeCustomReason: (value: string) => void; code: GQLREJECTION_REASON_CODE; - value: string | null; + explanationValue: string | null; + customReasonValue: string | null; onBack: () => void; } @@ -36,9 +38,11 @@ const AddExplanationButton: FunctionComponent<{ onClick: () => void }> = ({ const DetailedExplanation: FunctionComponent = ({ code, - value, - onChange, + explanationValue, + onChangeExplanation, onBack, + customReasonValue, + onChangeCustomReason, }) => { const [showAddExplanation, setShowAddExplanation] = useState( !!(code === GQLREJECTION_REASON_CODE.OTHER) @@ -48,7 +52,7 @@ const DetailedExplanation: FunctionComponent = ({ <> @@ -60,13 +64,36 @@ const DetailedExplanation: FunctionComponent = ({
{unsnake(code)}
+ {code === GQLREJECTION_REASON_CODE.OTHER && ( + <> + + + + +