fix import, move cast
This commit is contained in:
1 parent
8360c05448
commit
09be4cdf9a
3 files changed
+11
-9
No files matched your search
@@ -3,7 +3,6 @@ import { useEffect } from "react";
|
||||
import { logger } from "@/Utils/logger";
|
||||
import { useParams, useLocation, useNavigate } from "react-router";
|
||||
import { useForm, Controller } from "react-hook-form";
|
||||
import type { FieldPath } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useTheme } from "@mui/material";
|
||||
import Stack from "@mui/material/Stack";
|
||||
@@ -278,9 +277,7 @@ const CreateMonitorPage = () => {
|
||||
const totalSteps = monitorStepCount(watchedType);
|
||||
|
||||
const handleNext = async () => {
|
||||
const isValid = await trigger(
|
||||
stepFieldsFor(watchedType, currentStep) as FieldPath<MonitorFormData>[]
|
||||
);
|
||||
const isValid = await trigger(stepFieldsFor(watchedType, currentStep));
|
||||
if (isValid) {
|
||||
setCurrentStep((step) => step + 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user