refactor(marketing): Standardize marketing wizard steps with initial data support
- Add support for initial data in all marketing wizard step components - Update step presenters to accept and handle initial data - Modify forwardRef implementations to include initialData prop - Add TypeScript interfaces for step component props - Improve type safety and data handling across marketing wizard steps - Prepare components for edit and create workflows with consistent data management
This commit is contained in:
@@ -8,13 +8,15 @@ interface FooterFormValues {
|
||||
copyright: string;
|
||||
}
|
||||
|
||||
const useFooterStepPresenter = () => {
|
||||
const useFooterStepPresenter = (initialData?: FooterFormValues) => {
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
formState: { errors },
|
||||
getValues,
|
||||
} = useForm<FooterFormValues>();
|
||||
} = useForm<FooterFormValues>({
|
||||
defaultValues: initialData,
|
||||
});
|
||||
|
||||
const onSubmit = (data: FooterFormValues) => {
|
||||
console.log(data);
|
||||
@@ -34,4 +36,4 @@ const useFooterStepPresenter = () => {
|
||||
};
|
||||
};
|
||||
|
||||
export default useFooterStepPresenter;
|
||||
export default useFooterStepPresenter;
|
||||
|
||||
Reference in New Issue
Block a user