This commit is contained in:
Pablo Lara
2024-10-02 16:09:26 +02:00
parent 6e37d8d850
commit a72b33597d
17 changed files with 133 additions and 135 deletions
+1 -3
View File
@@ -9,7 +9,7 @@ import { useFormState } from "react-dom";
import { useForm } from "react-hook-form";
import { z } from "zod";
import { authenticate } from "@/actions";
import { authenticate } from "@/actions/auth";
import {
Form,
FormControl,
@@ -53,14 +53,12 @@ export const AuthForm = ({ type }: { type: string }) => {
try {
// Sign-up logic will be here.
if (type === "sign-in") {
console.log(data);
dispatch({
email: data.email.toLowerCase(),
password: data.password,
});
}
if (type === "sign-up") {
console.log(data);
// const newUser = await signUp(data);
}
} catch (error) {
@@ -2,7 +2,7 @@
import { useRef } from "react";
import { checkConnectionProvider } from "@/actions";
import { checkConnectionProvider } from "@/actions/providers";
import { CustomButtonClientAction } from "../ui/custom";
import { useToast } from "../ui/toast";
+1 -1
View File
@@ -5,7 +5,7 @@ import { Dispatch, SetStateAction } from "react";
import { useForm } from "react-hook-form";
import * as z from "zod";
import { addProvider } from "@/actions";
import { addProvider } from "@/actions/providers";
import { SaveIcon } from "@/components/icons";
import { useToast } from "@/components/ui";
import { CustomButton, CustomInput } from "@/components/ui/custom";
+1 -1
View File
@@ -5,7 +5,7 @@ import React, { Dispatch, SetStateAction } from "react";
import { useForm } from "react-hook-form";
import * as z from "zod";
import { deleteProvider } from "@/actions";
import { deleteProvider } from "@/actions/providers";
import { DeleteIcon } from "@/components/icons";
import { useToast } from "@/components/ui";
import { CustomButton } from "@/components/ui/custom";
+1 -1
View File
@@ -5,7 +5,7 @@ import { Dispatch, SetStateAction } from "react";
import { useForm } from "react-hook-form";
import * as z from "zod";
import { updateProvider } from "@/actions";
import { updateProvider } from "@/actions/providers";
import { SaveIcon } from "@/components/icons";
import { useToast } from "@/components/ui";
import { CustomButton, CustomInput } from "@/components/ui/custom";
+1 -1
View File
@@ -9,7 +9,7 @@ import { useSession } from "next-auth/react";
import React, { useCallback } from "react";
import { useMediaQuery } from "usehooks-ts";
import { logOut } from "@/actions";
import { logOut } from "@/actions/auth";
import { useUIStore } from "@/store";
import {