From 3d440b4982f2b2559dc2d8f02a9eb71cbde06ee1 Mon Sep 17 00:00:00 2001 From: Sinan Date: Tue, 27 Aug 2024 10:36:20 +0530 Subject: [PATCH] Sign Up Completed --- client/.env.local | 2 +- client/app/layout.tsx | 58 +++--- client/app/page.tsx | 8 +- client/components/Loader.tsx | 5 + client/components/forms/AppointmentForm.tsx | 2 +- client/components/forms/RegistrationForm.tsx | 2 +- client/components/forms/SigninForm.tsx | 4 +- client/components/forms/SignupForm.tsx | 61 ++++-- client/components/forms/admin/SigninForm.tsx | 2 +- client/components/ui/toast.tsx | 130 ++++++++++++ client/components/ui/toaster.tsx | 35 ++++ client/components/ui/use-toast.ts | 194 ++++++++++++++++++ client/components/utils/CustomFormField.tsx | 1 + client/components/utils/SubmitButton.tsx | 4 +- client/lib/features/api/authApi.ts | 22 +- .../lib/middlewares/localStorageMiddleware.ts | 2 +- .../lib/{ => validators}/adminValidation.ts | 0 client/lib/{ => validators}/userValidation.ts | 6 +- client/next.config.mjs | 43 +++- client/package-lock.json | 35 ++++ client/package.json | 1 + client/public/assets/icons/loader.svg | 36 +--- .../assets/icons/social/message-waiting.svg | 1 + client/types/auth.ts | 13 +- client/types/index.ts | 17 +- package.json | 2 +- server/package.json | 1 + server/src/index.ts | 11 +- .../controllers/PatientController.ts | 4 +- .../patient/RegisterPatientUseCase.ts | 12 +- 30 files changed, 600 insertions(+), 114 deletions(-) create mode 100644 client/components/Loader.tsx create mode 100644 client/components/ui/toast.tsx create mode 100644 client/components/ui/toaster.tsx create mode 100644 client/components/ui/use-toast.ts rename client/lib/{ => validators}/adminValidation.ts (100%) rename client/lib/{ => validators}/userValidation.ts (93%) create mode 100644 client/public/assets/icons/social/message-waiting.svg diff --git a/client/.env.local b/client/.env.local index 26d8516a..6f502140 100644 --- a/client/.env.local +++ b/client/.env.local @@ -1,2 +1,2 @@ NEXT_PUBLIC_ENV=development -NEXT_NODE_SERVER_URL=http://localhost:3000 \ No newline at end of file +NEXT_PUBLIC_SERVER_URL=http://localhost:8000 \ No newline at end of file diff --git a/client/app/layout.tsx b/client/app/layout.tsx index 3a904637..24d8af14 100644 --- a/client/app/layout.tsx +++ b/client/app/layout.tsx @@ -6,44 +6,40 @@ import { ThemeProvider } from "@/components/ThemeProvider"; import { StoreProvider } from "./StoreProvider"; import NavBar from "@/components/NavBar"; import Footer from "@/components/Footer"; +import { Toaster } from "@/components/ui/toaster"; const inter = Plus_Jakarta_Sans({ - subsets: ["latin"], - weight: ["300", "400", "700", "700"], - variable: "--font-sans", + subsets: ["latin"], + weight: ["300", "400", "700", "700"], + variable: "--font-sans", }); export const metadata: Metadata = { - title: { - absolute: "", - template: "AVM | %s", - default: "AVM Ayurveda's", - }, - description: - "Appointment booking and video call consultation, an ayurveda hospital", + title: { + absolute: "", + template: "AVM | %s", + default: "AVM Ayurveda's", + }, + description: "Appointment booking and video call consultation, an ayurveda hospital", }; export default function RootLayout({ - children, + children, }: Readonly<{ - children: React.ReactNode; + children: React.ReactNode; }>) { - return ( - - - - - - {children} -