I see this error with the app, reported by NextJS, please fix it. The er
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { useState, useTransition, useMemo } from 'react';
|
import React, { useState, useTransition, useMemo, useCallback } from 'react';
|
||||||
import { Step1ProjectType } from './step-1-project-type';
|
import { Step1ProjectType } from './step-1-project-type';
|
||||||
import { Step2ServiceType } from './step-2-service-type';
|
import { Step2ServiceType } from './step-2-service-type';
|
||||||
import { Step3ProjectStage } from './step-3-project-stage';
|
import { Step3ProjectStage } from './step-3-project-stage';
|
||||||
@@ -140,9 +140,9 @@ export function CostEstimatorForm() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUpdateFormData = (newData: Partial<FormData>) => {
|
const handleUpdateFormData = useCallback((newData: Partial<FormData>) => {
|
||||||
setFormData((prev) => ({ ...prev, ...newData }));
|
setFormData((prev) => ({ ...prev, ...newData }));
|
||||||
};
|
}, []);
|
||||||
|
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
setFormData({
|
setFormData({
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export function Step7Illustrations({ onNext, onBack, onUpdateData, formData }: S
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
onUpdateData({ illustrations: selections });
|
onUpdateData({ illustrations: selections });
|
||||||
}, [selections, onUpdateData]);
|
}, [selections]);
|
||||||
|
|
||||||
const handle2dCheck = (checked: boolean) => {
|
const handle2dCheck = (checked: boolean) => {
|
||||||
setSelections(prev => ({
|
setSelections(prev => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user