Skip to content

Commit

Permalink
fix date format sent to Hyperion
Browse files Browse the repository at this point in the history
  • Loading branch information
julien4215 committed Jun 25, 2024
1 parent f3d4b49 commit 0ea958f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/activate/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
import { toast } from "@/components/ui/use-toast";
import { zPassword } from "@/lib/types";
import { zodResolver } from "@hookform/resolvers/zod";
import { addYears } from "date-fns";
import { addYears, format } from "date-fns";
import { isValidPhoneNumber } from "libphonenumber-js";
import { useRouter } from "next/navigation";
import { useState } from "react";
Expand Down Expand Up @@ -119,7 +119,9 @@ const RegisterPage = () => {
name: values.name,
password: values.password,
nickname: values.nickname,
birthday: values.birthday?.toString(),
birthday: values.birthday
? format(values.birthday, "yyyy-MM-dd")
: undefined,
phone: values.phone,
floor: values.floor as FloorsType | undefined | null,
promo: values.promo ? parseInt(values.promo) : undefined,
Expand Down

0 comments on commit 0ea958f

Please sign in to comment.