From b07f7af30c3ebdd0e5a74b9f891c79267d748cd7 Mon Sep 17 00:00:00 2001 From: Leon Serfaty G Date: Thu, 17 Jul 2025 10:27:43 +0000 Subject: [PATCH] Yes, I need eye-catching 2D illustrations Make them static = 10 ho --- .../cost-estimator/step-7-illustrations.tsx | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/cost-estimator/step-7-illustrations.tsx b/src/components/cost-estimator/step-7-illustrations.tsx index a53e488..e974bc0 100644 --- a/src/components/cost-estimator/step-7-illustrations.tsx +++ b/src/components/cost-estimator/step-7-illustrations.tsx @@ -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) => { 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
- +
{selections.has2d && ( @@ -136,7 +138,7 @@ export function Step7Illustrations({ onNext, onBack, onUpdateData, formData }: S
- +
{selections.has3d && (