1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-29 10:09:44 +02:00

Add validation to background field

This commit is contained in:
Maksim Eltyshev 2020-06-03 22:27:20 +05:00
parent ab83d7c9ab
commit 99d9ab4a9e
10 changed files with 130 additions and 25 deletions

View file

@ -54,17 +54,10 @@ const ActionsStep = React.memo(
);
const handleBackgroundImageDelete = useCallback(() => {
const data = {
onUpdate({
backgroundImage: null,
};
// TODO: move to services?
if (project.background && project.background.type === 'image') {
data.background = null;
}
onUpdate(data);
}, [project.background, onUpdate]);
});
}, [onUpdate]);
if (step) {
if (step) {