Yes, I need eye-catching 2D illustrations

Make them static   = 10 ho
This commit is contained in:
Leon Serfaty G
2025-07-17 10:27:43 +00:00
parent 38c5cbdff7
commit b07f7af30c
@@ -22,10 +22,10 @@ const designHoursMap = {
};
const illustrationHours = {
'2d_static': 40,
'2d_animated': 80,
'3d_static': 100,
'3d_animated': 200,
'2d_static': 10,
'2d_animated': 25,
'3d_static': 20,
'3d_animated': 40,
}
const calculateHours = (
@@ -61,13 +61,17 @@ export function Step7Illustrations({ onNext, onBack, onUpdateData, formData }: S
useEffect(() => {
const no2d = !selections.has2d || selections.is2dAnimated === null;
const no3d = !selections.has3d || selections.is3dAnimated === null;
setNoIllustrations(no2d && no3d);
const noIllustrationsSelected = !selections.has2d && !selections.has3d;
setNoIllustrations(noIllustrationsSelected);
}, [selections]);
const handleUpdate = (newSelections: Partial<IllustrationSelection>) => {
const updated = { ...selections, ...newSelections };
setSelections(updated);
onUpdateData({ illustrations: updated });
if(updated.has2d || updated.has3d) {
setNoIllustrations(false);
}
};
const handleNoIllustrationsChange = (checked: boolean) => {
@@ -85,13 +89,11 @@ export function Step7Illustrations({ onNext, onBack, onUpdateData, formData }: S
}
const handle2dCheck = (checked: boolean) => {
handleUpdate({ has2d: checked, is2dAnimated: checked ? 'static' : null });
if (!checked && !selections.has3d) setNoIllustrations(true);
handleUpdate({ has2d: checked, is2dAnimated: checked ? selections.is2dAnimated || 'static' : null });
};
const handle3dCheck = (checked: boolean) => {
handleUpdate({ has3d: checked, is3dAnimated: checked ? 'static' : null });
if (!checked && !selections.has2d) setNoIllustrations(true);
handleUpdate({ has3d: checked, is3dAnimated: checked ? selections.is3dAnimated || 'static' : null });
};
const estimatedHours = useMemo(() => {
@@ -113,7 +115,7 @@ export function Step7Illustrations({ onNext, onBack, onUpdateData, formData }: S
<div className="space-y-4 rounded-lg border p-4">
<div className="flex items-center space-x-2">
<Checkbox id="2d-illustrations" checked={selections.has2d} onCheckedChange={handle2dCheck} />
<Checkbox id="2d-illustrations" checked={selections.has2d} onCheckedChange={handle2dCheck} disabled={noIllustrations} />
<Label htmlFor="2d-illustrations" className="text-lg">Yes, I need eye-catching 2D illustrations</Label>
</div>
{selections.has2d && (
@@ -136,7 +138,7 @@ export function Step7Illustrations({ onNext, onBack, onUpdateData, formData }: S
<div className="space-y-4 rounded-lg border p-4">
<div className="flex items-center space-x-2">
<Checkbox id="3d-illustrations" checked={selections.has3d} onCheckedChange={handle3dCheck} />
<Checkbox id="3d-illustrations" checked={selections.has3d} onCheckedChange={handle3dCheck} disabled={noIllustrations} />
<Label htmlFor="3d-illustrations" className="text-lg">Yes, let's add some gorgeous 3D illustrations</Label>
</div>
{selections.has3d && (