feat: Add dedicated button to make project private

This commit is contained in:
Maksim Eltyshev
2025-07-23 15:37:16 +02:00
parent ef35ec279e
commit d40b4d3224
5 changed files with 81 additions and 32 deletions
@@ -19,7 +19,17 @@ const ButtonTypes = {
};
const ConfirmationStep = React.memo(
({ title, content, buttonType, buttonContent, typeValue, typeContent, onConfirm, onBack }) => {
({
title,
content,
buttonType,
buttonContent,
typeValue,
typeContent,
onConfirm,
onBack,
onClose,
}) => {
const [t] = useTranslation();
const [data, handleFieldChange] = useForm({
@@ -45,8 +55,12 @@ const ConfirmationStep = React.memo(
}
onConfirm();
if (onClose) {
onClose();
}
},
[typeValue, onConfirm, data, nameFieldRef],
[typeValue, onConfirm, onClose, data, nameFieldRef],
);
useEffect(() => {
@@ -101,6 +115,7 @@ ConfirmationStep.propTypes = {
typeContent: PropTypes.string,
onConfirm: PropTypes.func.isRequired,
onBack: PropTypes.func,
onClose: PropTypes.func,
};
ConfirmationStep.defaultProps = {
@@ -108,6 +123,7 @@ ConfirmationStep.defaultProps = {
typeValue: undefined,
typeContent: undefined,
onBack: undefined,
onClose: undefined,
};
export default ConfirmationStep;