remove unused moment

This commit is contained in:
user 2024-05-24 14:15:19 +03:00
parent 6d37b74706
commit 195ee714e9
1 changed files with 18 additions and 18 deletions

View File

@ -45,24 +45,24 @@ export const DataStep = ({ nextStep }: DataStepProps) => {
},
});
const handleSubmit = () => {
form.handleSubmit(async (values: FormValues) => {
try {
rootStore.setName(values.name);
if (values.author) {
rootStore.setAuthor(values.author);
}
const res = await auth.mutateAsync();
sessionStorage.setItem("auth_v1_token", res.data.auth_v1_token);
nextStep();
} catch (error) {
console.error("Error:", error);
}
})();
};
// const handleSubmit = () => {
// form.handleSubmit(async (values: FormValues) => {
// try {
// rootStore.setName(values.name);
//
// if (values.author) {
// rootStore.setAuthor(values.author);
// }
//
// const res = await auth.mutateAsync();
// sessionStorage.setItem("auth_v1_token", res.data.auth_v1_token);
//
// nextStep();
// } catch (error) {
// console.error("Error:", error);
// }
// })();
// };
return (
<section className={"mt-4 px-4 pb-8"}>