Yes, I need eye-catching 2D illustrations
Make them static = 10 ho
This commit is contained in:
@@ -22,10 +22,10 @@ const designHoursMap = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const illustrationHours = {
|
const illustrationHours = {
|
||||||
'2d_static': 40,
|
'2d_static': 10,
|
||||||
'2d_animated': 80,
|
'2d_animated': 25,
|
||||||
'3d_static': 100,
|
'3d_static': 20,
|
||||||
'3d_animated': 200,
|
'3d_animated': 40,
|
||||||
}
|
}
|
||||||
|
|
||||||
const calculateHours = (
|
const calculateHours = (
|
||||||
@@ -61,13 +61,17 @@ export function Step7Illustrations({ onNext, onBack, onUpdateData, formData }: S
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const no2d = !selections.has2d || selections.is2dAnimated === null;
|
const no2d = !selections.has2d || selections.is2dAnimated === null;
|
||||||
const no3d = !selections.has3d || selections.is3dAnimated === null;
|
const no3d = !selections.has3d || selections.is3dAnimated === null;
|
||||||
setNoIllustrations(no2d && no3d);
|
const noIllustrationsSelected = !selections.has2d && !selections.has3d;
|
||||||
|
setNoIllustrations(noIllustrationsSelected);
|
||||||
}, [selections]);
|
}, [selections]);
|
||||||
|
|
||||||
const handleUpdate = (newSelections: Partial<IllustrationSelection>) => {
|
const handleUpdate = (newSelections: Partial<IllustrationSelection>) => {
|
||||||
const updated = { ...selections, ...newSelections };
|
const updated = { ...selections, ...newSelections };
|
||||||
setSelections(updated);
|
setSelections(updated);
|
||||||
onUpdateData({ illustrations: updated });
|
onUpdateData({ illustrations: updated });
|
||||||
|
if(updated.has2d || updated.has3d) {
|
||||||
|
setNoIllustrations(false);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleNoIllustrationsChange = (checked: boolean) => {
|
const handleNoIllustrationsChange = (checked: boolean) => {
|
||||||
@@ -85,13 +89,11 @@ export function Step7Illustrations({ onNext, onBack, onUpdateData, formData }: S
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handle2dCheck = (checked: boolean) => {
|
const handle2dCheck = (checked: boolean) => {
|
||||||
handleUpdate({ has2d: checked, is2dAnimated: checked ? 'static' : null });
|
handleUpdate({ has2d: checked, is2dAnimated: checked ? selections.is2dAnimated || 'static' : null });
|
||||||
if (!checked && !selections.has3d) setNoIllustrations(true);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handle3dCheck = (checked: boolean) => {
|
const handle3dCheck = (checked: boolean) => {
|
||||||
handleUpdate({ has3d: checked, is3dAnimated: checked ? 'static' : null });
|
handleUpdate({ has3d: checked, is3dAnimated: checked ? selections.is3dAnimated || 'static' : null });
|
||||||
if (!checked && !selections.has2d) setNoIllustrations(true);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const estimatedHours = useMemo(() => {
|
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="space-y-4 rounded-lg border p-4">
|
||||||
<div className="flex items-center space-x-2">
|
<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>
|
<Label htmlFor="2d-illustrations" className="text-lg">Yes, I need eye-catching 2D illustrations</Label>
|
||||||
</div>
|
</div>
|
||||||
{selections.has2d && (
|
{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="space-y-4 rounded-lg border p-4">
|
||||||
<div className="flex items-center space-x-2">
|
<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>
|
<Label htmlFor="3d-illustrations" className="text-lg">Yes, let's add some gorgeous 3D illustrations</Label>
|
||||||
</div>
|
</div>
|
||||||
{selections.has3d && (
|
{selections.has3d && (
|
||||||
|
|||||||
Reference in New Issue
Block a user