Skip to content

Commit

Permalink
working
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanptm committed Aug 18, 2024
1 parent 6d8b97d commit 48cd9e9
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 65 deletions.
3 changes: 1 addition & 2 deletions client/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { Metadata } from "next";
import { Plus_Jakarta_Sans } from "next/font/google";
import "./globals.css";

import "@/styles/global.css";
import { cn } from "@/lib/utils";
import { ThemeProvider } from "@/components/theme-provider";
import StoreProvider from "./StoreProvider";
Expand Down
6 changes: 3 additions & 3 deletions client/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React from 'react'

const page = () => {
return (
<div className="grid grid-cols-1 h-[40rem] w-full bg-white dark:bg-black relative border border-neutral-200 dark:border-white/[0.2] rounded-md">
// <div className="grid grid-cols-1 h-[40rem] w-full bg-white dark:bg-black relative border border-neutral-200 dark:border-white/[0.2] rounded-md">
<p className="dark:text-white text-neutral-00 text-center text-4xl mt-40 font-bold">
Scroll back up to reveal Navbar
</p>
<div className="inset-0 absolute bg-grid-black/[0.1] dark:bg-grid-white/[0.2]" />
</div>
// <div className="inset-0 absolute bg-grid-black/[0.1] dark:bg-grid-white/[0.2]" />
// </div>
)
}

Expand Down
8 changes: 3 additions & 5 deletions client/app/patient/signin/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import SigninForm from "@/components/forms/SigninForm";
import OtpVerificationModel from "@/components/modles/OtpVerificationModel";
import Image from "next/image";
import Link from "next/link";
const SignIn = ()=> {

return (
<div className="flex h-screen max-h-screen">
<OtpVerificationModel />
<section className="remove-scrollbar container my-auto">
<div className="sub-container max-[496px:">
<Image
Expand All @@ -17,12 +15,12 @@ const SignIn = ()=> {
className="mb-12 h-10 w-fit"
/>
<SigninForm />
<div className="text-14-regular mt-20 flex justify-between">
<div className="text-14-regular py-12 flex justify-between">
<p className="justify-items-end text-dark-600 xl:text-left">
© 2024 AVM Ayurveda&apos;s
</p>
<Link href={"/admin/signin"} className="text-green-500">
Admin
<Link href={"/doctor/signin"} className="text-green-500">
Doctor
</Link>
</div>
</div>
Expand Down
21 changes: 16 additions & 5 deletions client/components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
import React from "react";
import { FloatingNav } from "./ui/floating-navbar";
import { NavItems } from "@/constants";
import { usePathname } from "next/navigation";
const NavBar = () => {
return (
<div className="relative w-full">
<FloatingNav navItems={NavItems} />
</div>
);
const pathName = usePathname();

if (
!pathName.includes("/signin") &&
!pathName.includes("/register") &&
!pathName.includes("/new-appointment") &&
!pathName.includes("/signup")
){
return (
<div className="relative w-full">
<FloatingNav navItems={NavItems} />
</div>
);
}

};

export default NavBar;
21 changes: 21 additions & 0 deletions client/components/SearchInput.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React, { useState } from 'react'
import { FormFieldType, SearchInputProps } from '@/types/fromTypes'
import { Input } from './ui/input'
import CustomFormField from './CustomFormField'
import { Button } from './ui/button'
import { Search } from 'lucide-react'

const SearchInput = ({placeHolder}:SearchInputProps) => {
const [input,setInput] = useState<string>('')
return (
<div className='boarder rounded-lg flex justify-between items-center'>
<Input type='text' placeholder={placeHolder} className='boarder-none' />
<Button variant={'ghost'} size={"icon"} >
<Search />
<span className='sr-only'>Search Button</span>
</Button>
</div>
)
}

export default SearchInput
4 changes: 2 additions & 2 deletions client/components/forms/admin/SigninForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SubmitButton from "@/components/SubmitButton";
import { signinFormValidation } from "@/lib/adminValidation";
import Link from "next/link";
import { FormFieldType } from "@/types/fromTypes";
import { IconMail } from "@tabler/icons-react";

const SigninForm = () => {
const [isLoading, setIsLoading] = useState<boolean>(false);
Expand Down Expand Up @@ -43,8 +44,7 @@ const SigninForm = () => {
name="email"
label="Email address *"
placeholder="[email protected]"
iconSrc="/assets/icons/email.svg"
iconAlt="email"
Icon={IconMail}
/>

<CustomFormField
Expand Down
3 changes: 0 additions & 3 deletions client/public/assets/icons/calendar.svg

This file was deleted.

3 changes: 0 additions & 3 deletions client/public/assets/icons/email.svg

This file was deleted.

12 changes: 0 additions & 12 deletions client/public/assets/icons/phone.svg

This file was deleted.

3 changes: 0 additions & 3 deletions client/public/assets/icons/user.svg

This file was deleted.

File renamed without changes.
61 changes: 34 additions & 27 deletions client/types/fromTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,37 @@ import { FC } from "react";
import { Control } from "react-hook-form";

export enum FormFieldType {
INPUT = "input",
TEXTAREA = "textarea",
PHONE_INPUT = "phoneInput",
CHECKBOX = "checkbox",
DATE_PICKER = "datePicker",
SELECT = "select",
SKELETON = "skeleton",
PASSWORD="password"
}

export interface CustomProps {
control: Control<any>;
name: string;
label?: string;
placeholder?: string;
iconSrc?: string;
iconAlt?: string;
disabled?: boolean;
dateFormat?: string;
showTimeSelect?: boolean;
children?: React.ReactNode;
renderSkeleton?: (field: any) => React.ReactNode;
fieldType: FormFieldType;
isLimited?:boolean;
availableTimes?:string[];
Icon?: FC<{ className?: string }>;
}
INPUT = "input",
TEXTAREA = "textarea",
PHONE_INPUT = "phoneInput",
CHECKBOX = "checkbox",
DATE_PICKER = "datePicker",
SELECT = "select",
SKELETON = "skeleton",
PASSWORD = "password",
}

export interface CustomProps {
control: Control<any>;
name: string;
label?: string;
placeholder?: string;
iconSrc?: string;
iconAlt?: string;
disabled?: boolean;
dateFormat?: string;
showTimeSelect?: boolean;
children?: React.ReactNode;
renderSkeleton?: (field: any) => React.ReactNode;
fieldType: FormFieldType;
isLimited?: boolean;
availableTimes?: string[];
Icon?: FC<{ className?: string }>;
}


export interface SearchInputProps {
placeHolder:string;
name?:string;
onChange?:()=>void
}

0 comments on commit 48cd9e9

Please sign in to comment.