diff --git a/README.md b/README.md index 34f41ab..315466d 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,42 @@ -Local dev setup +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). -1. Install project dependencies +## Getting Started -``` -npm i +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev ``` -2. Create a .env file from the .env.example file +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. +<<<<<<< Updated upstream ``` -cp .env.example .env +npx prisma studio ``` +======= +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. -3. Seed the database +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. -``` -npm run db:seed -``` +## Learn More -3. Run the project +To learn more about Next.js, take a look at the following resources: -``` -npm run dev -``` +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. -Use prisma studio to view the database +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! -``` -npx prisma studio -``` +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +>>>>>>> Stashed changes diff --git a/app/admin/data-table.tsx b/app/admin/data-table.tsx index b0e5b29..fd857f3 100644 --- a/app/admin/data-table.tsx +++ b/app/admin/data-table.tsx @@ -125,7 +125,7 @@ export function DataTable({ ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} ); @@ -144,7 +144,7 @@ export function DataTable({ {flexRender( cell.column.columnDef.cell, - cell.getContext() + cell.getContext(), )} ))} diff --git a/app/api/admin/responses/route.ts b/app/api/admin/responses/route.ts index d7fa235..cbbf6f6 100644 --- a/app/api/admin/responses/route.ts +++ b/app/api/admin/responses/route.ts @@ -77,7 +77,7 @@ export const POST = async (request: NextRequest) => { } catch (error) { return NextResponse.json( { error: "Error finding responses" }, - { status: 500 } + { status: 500 }, ); } }; diff --git a/app/api/form/route.ts b/app/api/form/route.ts index bd27948..b46bf76 100644 --- a/app/api/form/route.ts +++ b/app/api/form/route.ts @@ -25,7 +25,7 @@ const schema = z { message: "Both departments cannot be same", path: ["department1", "department2"], - } + }, ); export const POST = async (request: NextRequest) => { @@ -60,7 +60,7 @@ export const POST = async (request: NextRequest) => { if (acceptApplication?.value === false) { return NextResponse.json( { error: "We are not accepting applications at this time." }, - { status: 200 } + { status: 200 }, ); } diff --git a/app/api/recruitment/route.ts b/app/api/recruitment/route.ts index 1c22514..c986956 100644 --- a/app/api/recruitment/route.ts +++ b/app/api/recruitment/route.ts @@ -25,7 +25,7 @@ export const POST = async (request: NextRequest) => { if (acceptApplication?.value === false) { return NextResponse.json( { error: "We are not accepting applications at this time." }, - { status: 200 } + { status: 200 }, ); } diff --git a/app/api/submitted/route.ts b/app/api/submitted/route.ts index 106e2a0..0b997a6 100644 --- a/app/api/submitted/route.ts +++ b/app/api/submitted/route.ts @@ -25,12 +25,12 @@ export const POST = async (request: NextRequest) => { if (formSubmitted?.isFormSubmitted) { return NextResponse.json( { error: "Form already submitted" }, - { status: 200 } + { status: 200 }, ); } else { return NextResponse.json( { message: "Form not submitted" }, - { status: 200 } + { status: 200 }, ); } } catch (error) { diff --git a/app/components/Footer.tsx b/app/components/Footer.tsx index b866cc7..d7685f8 100644 --- a/app/components/Footer.tsx +++ b/app/components/Footer.tsx @@ -1,45 +1,51 @@ "use client"; -import { FaBlogger, FaDiscord, FaGithub, FaInstagram, FaLinkedin, FaXTwitter } from 'react-icons/fa6'; +import { + FaBlogger, + FaDiscord, + FaGithub, + FaInstagram, + FaLinkedin, + FaXTwitter, +} from "react-icons/fa6"; const Footer = () => { - return ( - -
-
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
+ return ( +
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+ - ); +
+
+ ); }; export default Footer; diff --git a/app/components/Nav.tsx b/app/components/Nav.tsx index 6aec8f2..9b1dc8b 100644 --- a/app/components/Nav.tsx +++ b/app/components/Nav.tsx @@ -5,7 +5,7 @@ import Image from "next/image"; import Logo from "../static/cyscom-logo.png"; import { Button } from "@/components/ui/button"; -import { FaGoogle } from 'react-icons/fa6'; +import { FaGoogle } from "react-icons/fa6"; const Nav = () => { const { data: session } = useSession(); @@ -33,9 +33,17 @@ const Nav = () => { Admin )} {session ? ( - + ) : ( - diff --git a/app/form/page.tsx b/app/form/page.tsx index fe80817..df870c7 100644 --- a/app/form/page.tsx +++ b/app/form/page.tsx @@ -52,7 +52,7 @@ export const formSchema = z { message: "Both departments cannot be same", path: ["department2"], - } + }, ); export default function FormPage() { diff --git a/app/globals.css b/app/globals.css index 6e367b3..2537082 100644 --- a/app/globals.css +++ b/app/globals.css @@ -70,6 +70,6 @@ } } -body{ - font-family: Inter !important; -} \ No newline at end of file +body { + font-family: Inter !important; +} diff --git a/app/interview/page.tsx b/app/interview/page.tsx index d067681..41f6bec 100644 --- a/app/interview/page.tsx +++ b/app/interview/page.tsx @@ -66,7 +66,7 @@ const Interview = () => { Congratulations, {session?.user?.name}! 🎉

- 🗓️ You have been shortlisted for an online interview on{" "}. + 🗓️ You have been shortlisted for an online interview on . {dateAssigned}

diff --git a/app/layout.tsx b/app/layout.tsx index 1048f5c..e333614 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -29,7 +29,7 @@ export default function RootLayout({ diff --git a/app/page.tsx b/app/page.tsx index 2cc3fca..8bae7b5 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -10,159 +10,218 @@ import { useSession } from "next-auth/react"; import Link from "next/link"; export default function Home() { - const { data: session } = useSession(); + const { data: session } = useSession(); - return ( -
-
- CYSCOM -
-
-

- CYSCOM -

-

VIT Chennai

-

RECRUITMENTS 2024-25

-

- Started with a few people having cyber safety in mind, the chapter now - boasts a big gathering of members and associates alike. Join us on our - mission to make cyberspace a safer place! -

-

- Join CYSCOM to kickstart your cybersecurity journey. -

-
-
- {!session ? ( - - ) : ( - - )} -
-
-

DEPARTMENRTS

-
-
-

Development (Web-Dev and Open Source Projects)

-

- Responsibilities encompass the management of the primary chapter website, subsidiary event websites, and any additional web platforms integral to projects. -
-
- This role involves the creation of web development projects and applications for utilization within the chapter or by external parties. -

-
-
-

Technical (CTF and Projects)

-

- Our skilled technical team enthusiastically engages in Capture The Flag (CTF) competitions and undertakes exciting security-oriented projects. This involves friendly challenges where our experts showcase their problem-solving abilities by solving puzzles and overcoming digital obstacles. -
-
- Additionally, they're dedicated to crafting innovative projects that enhance the security of systems and data, making sure everything is well-guarded in our digital landscape. -

-
-
-
-
-

Design

-

- Responsibilities encompass the management of the primary chapter website, subsidiary event websites, and any additional web platforms integral to projects. -
-
- This role involves the creation of web development projects and applications for utilization within the chapter or by external parties. -

-
-
-

Event Management

-

- The Event Management Department at Cyscom, is the driving force behind our dynamic and engaging events. With meticulous coordination, the department orchestrates a diverse range of activities, catering to the interests of cybersecurity enthusiasts. -
-
- The team adeptly manages finances, ensuring every penny is well-utilized for impactful experiences. Leveraging strategic partnerships, the department actively secures sponsors that share our commitment to fostering knowledge-sharing and networking opportunities. -

-
-
-
-
-

Content

-

- The Content Department at Cyscom shapes cybersecurity discourse by crafting insightful blogs, news updates, and engaging infographic posts. As writers we delve into trends, developments, and best practices, fostering an informed community. -
-
- Plays an important role in spreading awareness about Cybersecurity, Teaching Technical Concepts to the public and finding creative ways to do the same. -

-
-
-

Social Media

-

- Responsible for posting regularly about the latest updates in the field of Cybersecurity on our platforms and boosting our online presence with trendy captions and hashtags to accompany our weekly posts. In short, it is the department which connects the backend of the chapter to the outside world. -

-
-
-
-
-

WHY JOIN CYSCOM?

-
-
-

- Get to be a part of the biggest cyber security student group in VIT Chennai! -

-
-
-

- Work on real time projects, learn effective collaboration and how to organize events! -

-
-
-

- Learn new and exciting technologies and tech stacks through webinars, online sessions and more! -

-
-
-

- Dive into the evolving world of cyber-security and learn about the best security practices! -

-
-
-
-
-

HOW TO APPLY?

-
-
-
    -
  • Login using your VIT email.
  • -
  • Fill the form with some basic details.
  • -
  • Choose your preferred interview slot and department. Apply before *date time* for *date* & *date* slots and before *date time* for *date* & *date* slots.
  • -
  • The interview will be conducted on Google Meet. If you are selected, attend the interview in the given time slot. The WhatsApp group link for the selected applicants will be sent to your email or will be displayed on this recruitment portal if you are selected. Google Meet link will be sent in the WhatsApp group. -
  • -
-
-
+ return ( +
+
+ CYSCOM +
+
+

+ CYSCOM +

+

VIT Chennai

+

+ RECRUITMENTS 2024-25 +

+

+ Started with a few people having cyber safety in mind, the chapter now + boasts a big gathering of members and associates alike. Join us on our + mission to make cyberspace a safer place! +

+

+ Join CYSCOM to kickstart your cybersecurity journey. +

+
+
+ {!session ? ( + + ) : ( + + )} +
+
+

+ DEPARTMENRTS +

+
+
+

+ Development (Web-Dev and Open Source Projects) +

+

+ Responsibilities encompass the management of the primary chapter + website, subsidiary event websites, and any additional web + platforms integral to projects. +
+
+ This role involves the creation of web development projects and + applications for utilization within the chapter or by external + parties. +

+
+
+

+ Technical (CTF and Projects) +

+

+ Our skilled technical team enthusiastically engages in Capture The + Flag (CTF) competitions and undertakes exciting security-oriented + projects. This involves friendly challenges where our experts + showcase their problem-solving abilities by solving puzzles and + overcoming digital obstacles. +
+
+ Additionally, they're dedicated to crafting innovative projects + that enhance the security of systems and data, making sure + everything is well-guarded in our digital landscape. +

+
+
+
+
+

Design

+

+ Responsibilities encompass the management of the primary chapter + website, subsidiary event websites, and any additional web + platforms integral to projects. +
+
+ This role involves the creation of web development projects and + applications for utilization within the chapter or by external + parties. +

+
+
+

+ Event Management +

+

+ The Event Management Department at Cyscom, is the driving force + behind our dynamic and engaging events. With meticulous + coordination, the department orchestrates a diverse range of + activities, catering to the interests of cybersecurity + enthusiasts. +
+
+ The team adeptly manages finances, ensuring every penny is + well-utilized for impactful experiences. Leveraging strategic + partnerships, the department actively secures sponsors that share + our commitment to fostering knowledge-sharing and networking + opportunities. +

+
+
+
+
+

Content

+

+ The Content Department at Cyscom shapes cybersecurity discourse by + crafting insightful blogs, news updates, and engaging infographic + posts. As writers we delve into trends, developments, and best + practices, fostering an informed community. +
+
+ Plays an important role in spreading awareness about + Cybersecurity, Teaching Technical Concepts to the public and + finding creative ways to do the same. +

+
+
+

Social Media

+

+ Responsible for posting regularly about the latest updates in the + field of Cybersecurity on our platforms and boosting our online + presence with trendy captions and hashtags to accompany our weekly + posts. In short, it is the department which connects the backend + of the chapter to the outside world. +

+
+
+
+
+

+ WHY JOIN CYSCOM? +

+
+
+

+ Get to be a part of the biggest cyber security student group in + VIT Chennai! +

+
+
+

+ Work on real time projects, learn effective collaboration and how + to organize events! +

+
+
+

+ Learn new and exciting technologies and tech stacks through + webinars, online sessions and more! +

+
+
+

+ Dive into the evolving world of cyber-security and learn about the + best security practices! +

+
+
+
+
+

+ HOW TO APPLY? +

+
+
+
    +
  • Login using your VIT email.
  • +
  • Fill the form with some basic details.
  • +
  • + Choose your preferred interview slot and department. Apply + before *date time* for *date* & *date* slots and before *date + time* for *date* & *date* slots. +
  • +
  • + The interview will be conducted on Google Meet. If you are + selected, attend the interview in the given time slot. The + WhatsApp group link for the selected applicants will be sent to + your email or will be displayed on this recruitment portal if + you are selected. Google Meet link will be sent in the WhatsApp + group. +
  • +
+
- ); +
+
+ ); } diff --git a/app/result/page.tsx b/app/result/page.tsx index 16171ee..8a23d1f 100644 --- a/app/result/page.tsx +++ b/app/result/page.tsx @@ -4,9 +4,6 @@ import React, { useEffect, useState } from "react"; import { useSession } from "next-auth/react"; import { redirect } from "next/navigation"; -import useWindowSize from "react-use/lib/useWindowSize"; -import Confetti from "react-confetti"; - import bg from "../assets/bg.jpg"; const Result = () => { @@ -45,8 +42,6 @@ const Result = () => { }); }, []); - const { width, height } = useWindowSize(); - return (
{ You have been selected for {primaryDept} department
We are happy to have on board! 🥳

-
) : (
diff --git a/components.json b/components.json index 15f2b02..fa674c9 100644 --- a/components.json +++ b/components.json @@ -14,4 +14,4 @@ "components": "@/components", "utils": "@/lib/utils" } -} \ No newline at end of file +} diff --git a/components/ui/button.tsx b/components/ui/button.tsx index 0ba4277..57c9fe4 100644 --- a/components/ui/button.tsx +++ b/components/ui/button.tsx @@ -1,8 +1,8 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const buttonVariants = cva( "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", @@ -30,27 +30,27 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } -) + }, +); export interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { - asChild?: boolean + asChild?: boolean; } const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button" + const Comp = asChild ? Slot : "button"; return ( - ) - } -) -Button.displayName = "Button" + ); + }, +); +Button.displayName = "Button"; -export { Button, buttonVariants } +export { Button, buttonVariants }; diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsx index 01ff19c..e72c2b5 100644 --- a/components/ui/dialog.tsx +++ b/components/ui/dialog.tsx @@ -1,18 +1,18 @@ -"use client" +"use client"; -import * as React from "react" -import * as DialogPrimitive from "@radix-ui/react-dialog" -import { X } from "lucide-react" +import * as React from "react"; +import * as DialogPrimitive from "@radix-ui/react-dialog"; +import { X } from "lucide-react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const Dialog = DialogPrimitive.Root +const Dialog = DialogPrimitive.Root; -const DialogTrigger = DialogPrimitive.Trigger +const DialogTrigger = DialogPrimitive.Trigger; -const DialogPortal = DialogPrimitive.Portal +const DialogPortal = DialogPrimitive.Portal; -const DialogClose = DialogPrimitive.Close +const DialogClose = DialogPrimitive.Close; const DialogOverlay = React.forwardRef< React.ElementRef, @@ -22,12 +22,12 @@ const DialogOverlay = React.forwardRef< ref={ref} className={cn( "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", - className + className, )} {...props} /> -)) -DialogOverlay.displayName = DialogPrimitive.Overlay.displayName +)); +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; const DialogContent = React.forwardRef< React.ElementRef, @@ -39,7 +39,7 @@ const DialogContent = React.forwardRef< ref={ref} className={cn( "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", - className + className, )} {...props} > @@ -50,8 +50,8 @@ const DialogContent = React.forwardRef< -)) -DialogContent.displayName = DialogPrimitive.Content.displayName +)); +DialogContent.displayName = DialogPrimitive.Content.displayName; const DialogHeader = ({ className, @@ -60,12 +60,12 @@ const DialogHeader = ({
-) -DialogHeader.displayName = "DialogHeader" +); +DialogHeader.displayName = "DialogHeader"; const DialogFooter = ({ className, @@ -74,12 +74,12 @@ const DialogFooter = ({
-) -DialogFooter.displayName = "DialogFooter" +); +DialogFooter.displayName = "DialogFooter"; const DialogTitle = React.forwardRef< React.ElementRef, @@ -89,12 +89,12 @@ const DialogTitle = React.forwardRef< ref={ref} className={cn( "text-lg font-semibold leading-none tracking-tight", - className + className, )} {...props} /> -)) -DialogTitle.displayName = DialogPrimitive.Title.displayName +)); +DialogTitle.displayName = DialogPrimitive.Title.displayName; const DialogDescription = React.forwardRef< React.ElementRef, @@ -105,8 +105,8 @@ const DialogDescription = React.forwardRef< className={cn("text-sm text-muted-foreground", className)} {...props} /> -)) -DialogDescription.displayName = DialogPrimitive.Description.displayName +)); +DialogDescription.displayName = DialogPrimitive.Description.displayName; export { Dialog, @@ -119,4 +119,4 @@ export { DialogFooter, DialogTitle, DialogDescription, -} +}; diff --git a/components/ui/dropdown-menu.tsx b/components/ui/dropdown-menu.tsx index f69a0d6..3a0c7fe 100644 --- a/components/ui/dropdown-menu.tsx +++ b/components/ui/dropdown-menu.tsx @@ -1,27 +1,27 @@ -"use client" +"use client"; -import * as React from "react" -import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu" -import { Check, ChevronRight, Circle } from "lucide-react" +import * as React from "react"; +import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; +import { Check, ChevronRight, Circle } from "lucide-react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const DropdownMenu = DropdownMenuPrimitive.Root +const DropdownMenu = DropdownMenuPrimitive.Root; -const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger +const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; -const DropdownMenuGroup = DropdownMenuPrimitive.Group +const DropdownMenuGroup = DropdownMenuPrimitive.Group; -const DropdownMenuPortal = DropdownMenuPrimitive.Portal +const DropdownMenuPortal = DropdownMenuPrimitive.Portal; -const DropdownMenuSub = DropdownMenuPrimitive.Sub +const DropdownMenuSub = DropdownMenuPrimitive.Sub; -const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup +const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup; const DropdownMenuSubTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, children, ...props }, ref) => ( {children} -)) +)); DropdownMenuSubTrigger.displayName = - DropdownMenuPrimitive.SubTrigger.displayName + DropdownMenuPrimitive.SubTrigger.displayName; const DropdownMenuSubContent = React.forwardRef< React.ElementRef, @@ -48,13 +48,13 @@ const DropdownMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", - className + className, )} {...props} /> -)) +)); DropdownMenuSubContent.displayName = - DropdownMenuPrimitive.SubContent.displayName + DropdownMenuPrimitive.SubContent.displayName; const DropdownMenuContent = React.forwardRef< React.ElementRef, @@ -66,18 +66,18 @@ const DropdownMenuContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", - className + className, )} {...props} /> -)) -DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName +)); +DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; const DropdownMenuItem = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName +)); +DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; const DropdownMenuCheckboxItem = React.forwardRef< React.ElementRef, @@ -100,7 +100,7 @@ const DropdownMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} checked={checked} {...props} @@ -112,9 +112,9 @@ const DropdownMenuCheckboxItem = React.forwardRef< {children} -)) +)); DropdownMenuCheckboxItem.displayName = - DropdownMenuPrimitive.CheckboxItem.displayName + DropdownMenuPrimitive.CheckboxItem.displayName; const DropdownMenuRadioItem = React.forwardRef< React.ElementRef, @@ -124,7 +124,7 @@ const DropdownMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", - className + className, )} {...props} > @@ -135,13 +135,13 @@ const DropdownMenuRadioItem = React.forwardRef< {children} -)) -DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName +)); +DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; const DropdownMenuLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName +)); +DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; const DropdownMenuSeparator = React.forwardRef< React.ElementRef, @@ -165,8 +165,8 @@ const DropdownMenuSeparator = React.forwardRef< className={cn("-mx-1 my-1 h-px bg-muted", className)} {...props} /> -)) -DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName +)); +DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; const DropdownMenuShortcut = ({ className, @@ -177,9 +177,9 @@ const DropdownMenuShortcut = ({ className={cn("ml-auto text-xs tracking-widest opacity-60", className)} {...props} /> - ) -} -DropdownMenuShortcut.displayName = "DropdownMenuShortcut" + ); +}; +DropdownMenuShortcut.displayName = "DropdownMenuShortcut"; export { DropdownMenu, @@ -197,4 +197,4 @@ export { DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, -} +}; diff --git a/components/ui/form.tsx b/components/ui/form.tsx index ce264ae..0b17ccf 100644 --- a/components/ui/form.tsx +++ b/components/ui/form.tsx @@ -1,8 +1,8 @@ -"use client" +"use client"; -import * as React from "react" -import * as LabelPrimitive from "@radix-ui/react-label" -import { Slot } from "@radix-ui/react-slot" +import * as React from "react"; +import * as LabelPrimitive from "@radix-ui/react-label"; +import { Slot } from "@radix-ui/react-slot"; import { Controller, ControllerProps, @@ -10,27 +10,27 @@ import { FieldValues, FormProvider, useFormContext, -} from "react-hook-form" +} from "react-hook-form"; -import { cn } from "@/lib/utils" -import { Label } from "@/components/ui/label" +import { cn } from "@/lib/utils"; +import { Label } from "@/components/ui/label"; -const Form = FormProvider +const Form = FormProvider; type FormFieldContextValue< TFieldValues extends FieldValues = FieldValues, - TName extends FieldPath = FieldPath + TName extends FieldPath = FieldPath, > = { - name: TName -} + name: TName; +}; const FormFieldContext = React.createContext( - {} as FormFieldContextValue -) + {} as FormFieldContextValue, +); const FormField = < TFieldValues extends FieldValues = FieldValues, - TName extends FieldPath = FieldPath + TName extends FieldPath = FieldPath, >({ ...props }: ControllerProps) => { @@ -38,21 +38,21 @@ const FormField = < - ) -} + ); +}; const useFormField = () => { - const fieldContext = React.useContext(FormFieldContext) - const itemContext = React.useContext(FormItemContext) - const { getFieldState, formState } = useFormContext() + const fieldContext = React.useContext(FormFieldContext); + const itemContext = React.useContext(FormItemContext); + const { getFieldState, formState } = useFormContext(); - const fieldState = getFieldState(fieldContext.name, formState) + const fieldState = getFieldState(fieldContext.name, formState); if (!fieldContext) { - throw new Error("useFormField should be used within ") + throw new Error("useFormField should be used within "); } - const { id } = itemContext + const { id } = itemContext; return { id, @@ -61,36 +61,36 @@ const useFormField = () => { formDescriptionId: `${id}-form-item-description`, formMessageId: `${id}-form-item-message`, ...fieldState, - } -} + }; +}; type FormItemContextValue = { - id: string -} + id: string; +}; const FormItemContext = React.createContext( - {} as FormItemContextValue -) + {} as FormItemContextValue, +); const FormItem = React.forwardRef< HTMLDivElement, React.HTMLAttributes >(({ className, ...props }, ref) => { - const id = React.useId() + const id = React.useId(); return (
- ) -}) -FormItem.displayName = "FormItem" + ); +}); +FormItem.displayName = "FormItem"; const FormLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => { - const { error, formItemId } = useFormField() + const { error, formItemId } = useFormField(); return (
-)) -Table.displayName = "Table" +)); +Table.displayName = "Table"; const TableHeader = React.forwardRef< HTMLTableSectionElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( -)) -TableHeader.displayName = "TableHeader" +)); +TableHeader.displayName = "TableHeader"; const TableBody = React.forwardRef< HTMLTableSectionElement, @@ -33,8 +33,8 @@ const TableBody = React.forwardRef< className={cn("[&_tr:last-child]:border-0", className)} {...props} /> -)) -TableBody.displayName = "TableBody" +)); +TableBody.displayName = "TableBody"; const TableFooter = React.forwardRef< HTMLTableSectionElement, @@ -44,12 +44,12 @@ const TableFooter = React.forwardRef< ref={ref} className={cn( "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", - className + className, )} {...props} /> -)) -TableFooter.displayName = "TableFooter" +)); +TableFooter.displayName = "TableFooter"; const TableRow = React.forwardRef< HTMLTableRowElement, @@ -59,12 +59,12 @@ const TableRow = React.forwardRef< ref={ref} className={cn( "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", - className + className, )} {...props} /> -)) -TableRow.displayName = "TableRow" +)); +TableRow.displayName = "TableRow"; const TableHead = React.forwardRef< HTMLTableCellElement, @@ -74,12 +74,12 @@ const TableHead = React.forwardRef< ref={ref} className={cn( "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", - className + className, )} {...props} /> -)) -TableHead.displayName = "TableHead" +)); +TableHead.displayName = "TableHead"; const TableCell = React.forwardRef< HTMLTableCellElement, @@ -90,8 +90,8 @@ const TableCell = React.forwardRef< className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)} {...props} /> -)) -TableCell.displayName = "TableCell" +)); +TableCell.displayName = "TableCell"; const TableCaption = React.forwardRef< HTMLTableCaptionElement, @@ -102,8 +102,8 @@ const TableCaption = React.forwardRef< className={cn("mt-4 text-sm text-muted-foreground", className)} {...props} /> -)) -TableCaption.displayName = "TableCaption" +)); +TableCaption.displayName = "TableCaption"; export { Table, @@ -114,4 +114,4 @@ export { TableRow, TableCell, TableCaption, -} +}; diff --git a/components/ui/textarea.tsx b/components/ui/textarea.tsx index 9f9a6dc..9f00573 100644 --- a/components/ui/textarea.tsx +++ b/components/ui/textarea.tsx @@ -1,6 +1,6 @@ -import * as React from "react" +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export interface TextareaProps extends React.TextareaHTMLAttributes {} @@ -11,14 +11,14 @@ const Textarea = React.forwardRef(