From e9bace7874b7176cc46c833cd0be7867fb5ef6cf Mon Sep 17 00:00:00 2001 From: Sinan Date: Tue, 27 Aug 2024 21:08:30 +0530 Subject: [PATCH] components folder changed --- client/app/layout.tsx | 6 +++--- client/app/page.tsx | 2 +- client/app/staff/layout.tsx | 2 +- client/components/{utils => common}/AnimatedCard.tsx | 0 client/components/{utils => common}/CustomFormField.tsx | 0 client/components/{ => common}/Loader.tsx | 0 client/components/{utils => common}/SubmitButton.tsx | 0 client/components/forms/AppointmentForm.tsx | 4 ++-- client/components/forms/OtpForms.tsx | 2 +- client/components/forms/RegistrationForm.tsx | 4 ++-- client/components/forms/SigninForm.tsx | 4 ++-- client/components/forms/SignupForm.tsx | 4 ++-- client/components/forms/admin/SigninForm.tsx | 4 ++-- client/components/home/FeatureList.tsx | 2 +- client/components/{ => layout}/AdminSideBar.tsx | 0 client/components/{ => layout}/Footer.tsx | 0 client/components/{ => layout}/NavBar.tsx | 0 client/components/{ => layout}/ThemeProvider.tsx | 0 client/resources.ts | 1 + 19 files changed, 18 insertions(+), 17 deletions(-) rename client/components/{utils => common}/AnimatedCard.tsx (100%) rename client/components/{utils => common}/CustomFormField.tsx (100%) rename client/components/{ => common}/Loader.tsx (100%) rename client/components/{utils => common}/SubmitButton.tsx (100%) rename client/components/{ => layout}/AdminSideBar.tsx (100%) rename client/components/{ => layout}/Footer.tsx (100%) rename client/components/{ => layout}/NavBar.tsx (100%) rename client/components/{ => layout}/ThemeProvider.tsx (100%) diff --git a/client/app/layout.tsx b/client/app/layout.tsx index 798b60fb..00b47523 100644 --- a/client/app/layout.tsx +++ b/client/app/layout.tsx @@ -2,9 +2,9 @@ import type { Metadata } from "next"; import { Plus_Jakarta_Sans } from "next/font/google"; import "../styles/globals.css"; import { cn } from "@/lib/utils"; -import { ThemeProvider } from "@/components/ThemeProvider"; -import NavBar from "@/components/NavBar"; -import Footer from "@/components/Footer"; +import { ThemeProvider } from "@/components/layout/ThemeProvider"; +import NavBar from "@/components/layout/NavBar"; +import Footer from "@/components/layout/Footer"; import { Toaster } from "@/components/ui/toaster"; const inter = Plus_Jakarta_Sans({ diff --git a/client/app/page.tsx b/client/app/page.tsx index 475833d2..6b74a5a9 100644 --- a/client/app/page.tsx +++ b/client/app/page.tsx @@ -2,7 +2,7 @@ import AboutAyurveda from "@/components/home/AboutAyurveda"; import ImageSlider from "@/components/home/ImageSlider"; import WhyUs from "@/components/home/WhyUs"; import dynamic from "next/dynamic"; -import Loader from "@/components/Loader"; +import Loader from "@/components/common/Loader"; const FeaturesList = dynamic(()=>import("@/components/home/FeatureList"),{ loading:()=>, diff --git a/client/app/staff/layout.tsx b/client/app/staff/layout.tsx index 35385805..a19c59a8 100644 --- a/client/app/staff/layout.tsx +++ b/client/app/staff/layout.tsx @@ -1,5 +1,5 @@ import { ReactNode, FC } from "react"; -import AdminSideBar from "@/components/AdminSideBar"; +import AdminSideBar from "@/components/layout/AdminSideBar"; import { Metadata } from "next"; interface AdminLayoutWrapperProps { diff --git a/client/components/utils/AnimatedCard.tsx b/client/components/common/AnimatedCard.tsx similarity index 100% rename from client/components/utils/AnimatedCard.tsx rename to client/components/common/AnimatedCard.tsx diff --git a/client/components/utils/CustomFormField.tsx b/client/components/common/CustomFormField.tsx similarity index 100% rename from client/components/utils/CustomFormField.tsx rename to client/components/common/CustomFormField.tsx diff --git a/client/components/Loader.tsx b/client/components/common/Loader.tsx similarity index 100% rename from client/components/Loader.tsx rename to client/components/common/Loader.tsx diff --git a/client/components/utils/SubmitButton.tsx b/client/components/common/SubmitButton.tsx similarity index 100% rename from client/components/utils/SubmitButton.tsx rename to client/components/common/SubmitButton.tsx diff --git a/client/components/forms/AppointmentForm.tsx b/client/components/forms/AppointmentForm.tsx index 0676a86f..f232c811 100644 --- a/client/components/forms/AppointmentForm.tsx +++ b/client/components/forms/AppointmentForm.tsx @@ -5,8 +5,8 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { Form } from "@/components/ui/form"; -import CustomFormField from "@/components/utils/CustomFormField"; -import SubmitButton from "@/components/utils/SubmitButton"; +import CustomFormField from "@/components/common/CustomFormField"; +import SubmitButton from "@/components/common/SubmitButton"; import { appointmentFormValidation } from "@/lib/validators/userValidation"; import { SelectItem } from "../ui/select"; import Image from "next/image"; diff --git a/client/components/forms/OtpForms.tsx b/client/components/forms/OtpForms.tsx index 7c72f776..8b450752 100644 --- a/client/components/forms/OtpForms.tsx +++ b/client/components/forms/OtpForms.tsx @@ -4,7 +4,7 @@ import { FormEvent } from "react"; import { InputOTP, InputOTPGroup, InputOTPSlot } from "@/components/ui/input-otp"; import { Otptimer } from "otp-timer-ts"; import { OtpFromProps } from "@/types/fromTypes"; -import SubmitButton from "../utils/SubmitButton"; +import SubmitButton from "../common/SubmitButton"; export default function OtpVerificationSection({ handleVerify, diff --git a/client/components/forms/RegistrationForm.tsx b/client/components/forms/RegistrationForm.tsx index cc9c83b6..f8fbfa26 100644 --- a/client/components/forms/RegistrationForm.tsx +++ b/client/components/forms/RegistrationForm.tsx @@ -6,8 +6,8 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { Form, FormControl } from "@/components/ui/form"; -import CustomFormField from "@/components/utils/CustomFormField"; -import SubmitButton from "@/components/utils/SubmitButton"; +import CustomFormField from "@/components/common/CustomFormField"; +import SubmitButton from "@/components/common/SubmitButton"; import { registerFormValidation } from "@/lib/validators/userValidation"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; import { Label } from "@radix-ui/react-label"; diff --git a/client/components/forms/SigninForm.tsx b/client/components/forms/SigninForm.tsx index 19988b96..b8a8fbf6 100644 --- a/client/components/forms/SigninForm.tsx +++ b/client/components/forms/SigninForm.tsx @@ -5,8 +5,8 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { Form } from "@/components/ui/form"; -import CustomFormField from "@/components/utils/CustomFormField"; -import SubmitButton from "@/components/utils/SubmitButton"; +import CustomFormField from "@/components/common/CustomFormField"; +import SubmitButton from "@/components/common/SubmitButton"; import { signinFormValidation } from "@/lib/validators/userValidation"; import Link from "next/link"; import { FormFieldType } from "@/types/fromTypes"; diff --git a/client/components/forms/SignupForm.tsx b/client/components/forms/SignupForm.tsx index 61b6705f..cb02a156 100644 --- a/client/components/forms/SignupForm.tsx +++ b/client/components/forms/SignupForm.tsx @@ -5,8 +5,8 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { Form } from "@/components/ui/form"; -import CustomFormField from "@/components/utils/CustomFormField"; -import SubmitButton from "@/components/utils/SubmitButton"; +import CustomFormField from "@/components/common/CustomFormField"; +import SubmitButton from "@/components/common/SubmitButton"; import { signupFormValidation } from "@/lib/validators/userValidation"; import { FormFieldType } from "@/types/fromTypes"; import Link from "next/link"; diff --git a/client/components/forms/admin/SigninForm.tsx b/client/components/forms/admin/SigninForm.tsx index 7dc2f779..5f864691 100644 --- a/client/components/forms/admin/SigninForm.tsx +++ b/client/components/forms/admin/SigninForm.tsx @@ -5,8 +5,8 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { Form } from "@/components/ui/form"; -import CustomFormField from "@/components/utils/CustomFormField"; -import SubmitButton from "@/components/utils/SubmitButton"; +import CustomFormField from "@/components/common/CustomFormField"; +import SubmitButton from "@/components/common/SubmitButton"; import { signinFormValidation } from "@/lib/validators/adminValidation"; import { FormFieldType } from "@/types/fromTypes"; diff --git a/client/components/home/FeatureList.tsx b/client/components/home/FeatureList.tsx index cd71ba8d..a8370db1 100644 --- a/client/components/home/FeatureList.tsx +++ b/client/components/home/FeatureList.tsx @@ -1,5 +1,5 @@ import React from "react"; -import AnimatedCard from "@/components/utils/AnimatedCard"; +import AnimatedCard from "@/components/common/AnimatedCard"; import { FeaturesCardsHomePage } from "@/constants"; const FeaturesList = () => { diff --git a/client/components/AdminSideBar.tsx b/client/components/layout/AdminSideBar.tsx similarity index 100% rename from client/components/AdminSideBar.tsx rename to client/components/layout/AdminSideBar.tsx diff --git a/client/components/Footer.tsx b/client/components/layout/Footer.tsx similarity index 100% rename from client/components/Footer.tsx rename to client/components/layout/Footer.tsx diff --git a/client/components/NavBar.tsx b/client/components/layout/NavBar.tsx similarity index 100% rename from client/components/NavBar.tsx rename to client/components/layout/NavBar.tsx diff --git a/client/components/ThemeProvider.tsx b/client/components/layout/ThemeProvider.tsx similarity index 100% rename from client/components/ThemeProvider.tsx rename to client/components/layout/ThemeProvider.tsx diff --git a/client/resources.ts b/client/resources.ts index b1ab9ad5..99fb536d 100644 --- a/client/resources.ts +++ b/client/resources.ts @@ -31,6 +31,7 @@ // 4th https://github.com/Nutlope/roomGPT // 5th https://github.com/steven-tey/dub +// https://github.com/raazi-muhammed/omniflow // https://nextjs.org/docs/app/building-your-application/data-fetching/caching-and-revalidating/