From 24cb81bce008788f2f36fcea208f1e3054cf432f Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Thu, 14 Nov 2024 12:16:05 -0500 Subject: [PATCH] Run prettier --- app/(auth)/actions.ts | 52 +- app/(auth)/auth.ts | 10 +- app/(chat)/api/files/upload/route.ts | 34 +- app/(chat)/api/history/route.ts | 6 +- components/custom/markdown.tsx | 12 +- components/custom/use-scroll-to-bottom.ts | 4 +- components/ui/alert-dialog.tsx | 66 +- components/ui/card.tsx | 49 +- components/ui/input.tsx | 14 +- components/ui/label.tsx | 20 +- components/ui/select.tsx | 72 +- components/ui/separator.tsx | 20 +- components/ui/sheet.tsx | 72 +- components/ui/skeleton.tsx | 8 +- components/ui/textarea.tsx | 14 +- db/migrate.ts | 20 +- drizzle.config.ts | 12 +- hooks/use-mobile.tsx | 24 +- middleware.ts | 6 +- package.json | 3 +- pnpm-lock.yaml | 7205 +++++++++++---------- 21 files changed, 4203 insertions(+), 3520 deletions(-) diff --git a/app/(auth)/actions.ts b/app/(auth)/actions.ts index d2e26bc..66006c9 100644 --- a/app/(auth)/actions.ts +++ b/app/(auth)/actions.ts @@ -1,10 +1,10 @@ -"use server"; +'use server'; -import { z } from "zod"; +import { z } from 'zod'; -import { createUser, getUser } from "@/db/queries"; +import { createUser, getUser } from '@/db/queries'; -import { signIn } from "./auth"; +import { signIn } from './auth'; const authFormSchema = z.object({ email: z.string().email(), @@ -12,74 +12,74 @@ const authFormSchema = z.object({ }); export interface LoginActionState { - status: "idle" | "in_progress" | "success" | "failed" | "invalid_data"; + status: 'idle' | 'in_progress' | 'success' | 'failed' | 'invalid_data'; } export const login = async ( _: LoginActionState, - formData: FormData, + formData: FormData ): Promise => { try { const validatedData = authFormSchema.parse({ - email: formData.get("email"), - password: formData.get("password"), + email: formData.get('email'), + password: formData.get('password'), }); - await signIn("credentials", { + await signIn('credentials', { email: validatedData.email, password: validatedData.password, redirect: false, }); - return { status: "success" }; + return { status: 'success' }; } catch (error) { if (error instanceof z.ZodError) { - return { status: "invalid_data" }; + return { status: 'invalid_data' }; } - return { status: "failed" }; + return { status: 'failed' }; } }; export interface RegisterActionState { status: - | "idle" - | "in_progress" - | "success" - | "failed" - | "user_exists" - | "invalid_data"; + | 'idle' + | 'in_progress' + | 'success' + | 'failed' + | 'user_exists' + | 'invalid_data'; } export const register = async ( _: RegisterActionState, - formData: FormData, + formData: FormData ): Promise => { try { const validatedData = authFormSchema.parse({ - email: formData.get("email"), - password: formData.get("password"), + email: formData.get('email'), + password: formData.get('password'), }); let [user] = await getUser(validatedData.email); if (user) { - return { status: "user_exists" } as RegisterActionState; + return { status: 'user_exists' } as RegisterActionState; } else { await createUser(validatedData.email, validatedData.password); - await signIn("credentials", { + await signIn('credentials', { email: validatedData.email, password: validatedData.password, redirect: false, }); - return { status: "success" }; + return { status: 'success' }; } } catch (error) { if (error instanceof z.ZodError) { - return { status: "invalid_data" }; + return { status: 'invalid_data' }; } - return { status: "failed" }; + return { status: 'failed' }; } }; diff --git a/app/(auth)/auth.ts b/app/(auth)/auth.ts index e7a25e1..1fa8401 100644 --- a/app/(auth)/auth.ts +++ b/app/(auth)/auth.ts @@ -1,10 +1,10 @@ -import { compare } from "bcrypt-ts"; -import NextAuth, { User, Session } from "next-auth"; -import Credentials from "next-auth/providers/credentials"; +import { compare } from 'bcrypt-ts'; +import NextAuth, { User, Session } from 'next-auth'; +import Credentials from 'next-auth/providers/credentials'; -import { getUser } from "@/db/queries"; +import { getUser } from '@/db/queries'; -import { authConfig } from "./auth.config"; +import { authConfig } from './auth.config'; interface ExtendedSession extends Session { user: User; diff --git a/app/(chat)/api/files/upload/route.ts b/app/(chat)/api/files/upload/route.ts index 868e448..ab1016b 100644 --- a/app/(chat)/api/files/upload/route.ts +++ b/app/(chat)/api/files/upload/route.ts @@ -1,21 +1,21 @@ -import { put } from "@vercel/blob"; -import { NextResponse } from "next/server"; -import { z } from "zod"; +import { put } from '@vercel/blob'; +import { NextResponse } from 'next/server'; +import { z } from 'zod'; -import { auth } from "@/app/(auth)/auth"; +import { auth } from '@/app/(auth)/auth'; const FileSchema = z.object({ file: z .instanceof(File) .refine((file) => file.size <= 5 * 1024 * 1024, { - message: "File size should be less than 5MB", + message: 'File size should be less than 5MB', }) .refine( (file) => - ["image/jpeg", "image/png", "application/pdf"].includes(file.type), + ['image/jpeg', 'image/png', 'application/pdf'].includes(file.type), { - message: "File type should be JPEG, PNG, or PDF", - }, + message: 'File type should be JPEG, PNG, or PDF', + } ), }); @@ -23,19 +23,19 @@ export async function POST(request: Request) { const session = await auth(); if (!session) { - return NextResponse.json({ error: "Unauthorized" }, { status: 401 }); + return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }); } if (request.body === null) { - return new Response("Request body is empty", { status: 400 }); + return new Response('Request body is empty', { status: 400 }); } try { const formData = await request.formData(); - const file = formData.get("file") as File; + const file = formData.get('file') as File; if (!file) { - return NextResponse.json({ error: "No file uploaded" }, { status: 400 }); + return NextResponse.json({ error: 'No file uploaded' }, { status: 400 }); } const validatedFile = FileSchema.safeParse({ file }); @@ -43,7 +43,7 @@ export async function POST(request: Request) { if (!validatedFile.success) { const errorMessage = validatedFile.error.errors .map((error) => error.message) - .join(", "); + .join(', '); return NextResponse.json({ error: errorMessage }, { status: 400 }); } @@ -53,17 +53,17 @@ export async function POST(request: Request) { try { const data = await put(`${filename}`, fileBuffer, { - access: "public", + access: 'public', }); return NextResponse.json(data); } catch (error) { - return NextResponse.json({ error: "Upload failed" }, { status: 500 }); + return NextResponse.json({ error: 'Upload failed' }, { status: 500 }); } } catch (error) { return NextResponse.json( - { error: "Failed to process request" }, - { status: 500 }, + { error: 'Failed to process request' }, + { status: 500 } ); } } diff --git a/app/(chat)/api/history/route.ts b/app/(chat)/api/history/route.ts index e1b8e07..0c98e79 100644 --- a/app/(chat)/api/history/route.ts +++ b/app/(chat)/api/history/route.ts @@ -1,11 +1,11 @@ -import { auth } from "@/app/(auth)/auth"; -import { getChatsByUserId } from "@/db/queries"; +import { auth } from '@/app/(auth)/auth'; +import { getChatsByUserId } from '@/db/queries'; export async function GET() { const session = await auth(); if (!session || !session.user) { - return Response.json("Unauthorized!", { status: 401 }); + return Response.json('Unauthorized!', { status: 401 }); } const chats = await getChatsByUserId({ id: session.user.id! }); diff --git a/components/custom/markdown.tsx b/components/custom/markdown.tsx index 245754b..7556738 100644 --- a/components/custom/markdown.tsx +++ b/components/custom/markdown.tsx @@ -1,12 +1,12 @@ -import Link from "next/link"; -import React, { memo } from "react"; -import ReactMarkdown from "react-markdown"; -import remarkGfm from "remark-gfm"; +import Link from 'next/link'; +import React, { memo } from 'react'; +import ReactMarkdown from 'react-markdown'; +import remarkGfm from 'remark-gfm'; const NonMemoizedMarkdown = ({ children }: { children: string }) => { const components = { code: ({ node, inline, className, children, ...props }: any) => { - const match = /language-(\w+)/.exec(className || ""); + const match = /language-(\w+)/.exec(className || ''); return !inline && match ? (
 {
 
 export const Markdown = memo(
   NonMemoizedMarkdown,
-  (prevProps, nextProps) => prevProps.children === nextProps.children,
+  (prevProps, nextProps) => prevProps.children === nextProps.children
 );
diff --git a/components/custom/use-scroll-to-bottom.ts b/components/custom/use-scroll-to-bottom.ts
index b75ad53..f5d0334 100644
--- a/components/custom/use-scroll-to-bottom.ts
+++ b/components/custom/use-scroll-to-bottom.ts
@@ -1,4 +1,4 @@
-import { useEffect, useRef, RefObject } from "react";
+import { useEffect, useRef, RefObject } from 'react';
 
 export function useScrollToBottom(): [
   RefObject,
@@ -13,7 +13,7 @@ export function useScrollToBottom(): [
 
     if (container && end) {
       const observer = new MutationObserver(() => {
-        end.scrollIntoView({ behavior: "instant", block: "end" });
+        end.scrollIntoView({ behavior: 'instant', block: 'end' });
       });
 
       observer.observe(container, {
diff --git a/components/ui/alert-dialog.tsx b/components/ui/alert-dialog.tsx
index 25e7b47..5cba559 100644
--- a/components/ui/alert-dialog.tsx
+++ b/components/ui/alert-dialog.tsx
@@ -1,16 +1,16 @@
-"use client"
+'use client';
 
-import * as React from "react"
-import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
+import * as React from 'react';
+import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
 
-import { cn } from "@/lib/utils"
-import { buttonVariants } from "@/components/ui/button"
+import { cn } from '@/lib/utils';
+import { buttonVariants } from '@/components/ui/button';
 
-const AlertDialog = AlertDialogPrimitive.Root
+const AlertDialog = AlertDialogPrimitive.Root;
 
-const AlertDialogTrigger = AlertDialogPrimitive.Trigger
+const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
 
-const AlertDialogPortal = AlertDialogPrimitive.Portal
+const AlertDialogPortal = AlertDialogPrimitive.Portal;
 
 const AlertDialogOverlay = React.forwardRef<
   React.ElementRef,
@@ -18,14 +18,14 @@ const AlertDialogOverlay = React.forwardRef<
 >(({ className, ...props }, ref) => (
   
-))
-AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName
+));
+AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
 
 const AlertDialogContent = React.forwardRef<
   React.ElementRef,
@@ -36,14 +36,14 @@ const AlertDialogContent = React.forwardRef<
     
   
-))
-AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
+));
+AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
 
 const AlertDialogHeader = ({
   className,
@@ -51,13 +51,13 @@ const AlertDialogHeader = ({
 }: React.HTMLAttributes) => (
   
-) -AlertDialogHeader.displayName = "AlertDialogHeader" +); +AlertDialogHeader.displayName = 'AlertDialogHeader'; const AlertDialogFooter = ({ className, @@ -65,13 +65,13 @@ const AlertDialogFooter = ({ }: React.HTMLAttributes) => (
-) -AlertDialogFooter.displayName = "AlertDialogFooter" +); +AlertDialogFooter.displayName = 'AlertDialogFooter'; const AlertDialogTitle = React.forwardRef< React.ElementRef, @@ -79,11 +79,11 @@ const AlertDialogTitle = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName +)); +AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName; const AlertDialogDescription = React.forwardRef< React.ElementRef, @@ -91,12 +91,12 @@ const AlertDialogDescription = React.forwardRef< >(({ className, ...props }, ref) => ( -)) +)); AlertDialogDescription.displayName = - AlertDialogPrimitive.Description.displayName + AlertDialogPrimitive.Description.displayName; const AlertDialogAction = React.forwardRef< React.ElementRef, @@ -107,8 +107,8 @@ const AlertDialogAction = React.forwardRef< className={cn(buttonVariants(), className)} {...props} /> -)) -AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName +)); +AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName; const AlertDialogCancel = React.forwardRef< React.ElementRef, @@ -117,14 +117,14 @@ const AlertDialogCancel = React.forwardRef< -)) -AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName +)); +AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName; export { AlertDialog, @@ -138,4 +138,4 @@ export { AlertDialogDescription, AlertDialogAction, AlertDialogCancel, -} +}; diff --git a/components/ui/card.tsx b/components/ui/card.tsx index afa13ec..fca7be4 100644 --- a/components/ui/card.tsx +++ b/components/ui/card.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'; const Card = React.forwardRef< HTMLDivElement, @@ -9,13 +9,13 @@ const Card = React.forwardRef<
-)) -Card.displayName = "Card" +)); +Card.displayName = 'Card'; const CardHeader = React.forwardRef< HTMLDivElement, @@ -23,11 +23,11 @@ const CardHeader = React.forwardRef< >(({ className, ...props }, ref) => (
-)) -CardHeader.displayName = "CardHeader" +)); +CardHeader.displayName = 'CardHeader'; const CardTitle = React.forwardRef< HTMLParagraphElement, @@ -36,13 +36,13 @@ const CardTitle = React.forwardRef<

-)) -CardTitle.displayName = "CardTitle" +)); +CardTitle.displayName = 'CardTitle'; const CardDescription = React.forwardRef< HTMLParagraphElement, @@ -50,19 +50,19 @@ const CardDescription = React.forwardRef< >(({ className, ...props }, ref) => (

-)) -CardDescription.displayName = "CardDescription" +)); +CardDescription.displayName = 'CardDescription'; const CardContent = React.forwardRef< HTMLDivElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( -

-)) -CardContent.displayName = "CardContent" +
+)); +CardContent.displayName = 'CardContent'; const CardFooter = React.forwardRef< HTMLDivElement, @@ -70,10 +70,17 @@ const CardFooter = React.forwardRef< >(({ className, ...props }, ref) => (
-)) -CardFooter.displayName = "CardFooter" +)); +CardFooter.displayName = 'CardFooter'; -export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } +export { + Card, + CardHeader, + CardFooter, + CardTitle, + CardDescription, + CardContent, +}; diff --git a/components/ui/input.tsx b/components/ui/input.tsx index a921025..c982112 100644 --- a/components/ui/input.tsx +++ b/components/ui/input.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 InputProps extends React.InputHTMLAttributes {} @@ -11,15 +11,15 @@ const Input = React.forwardRef( - ) + ); } -) -Input.displayName = "Input" +); +Input.displayName = 'Input'; -export { Input } +export { Input }; diff --git a/components/ui/label.tsx b/components/ui/label.tsx index 5341821..1e24ec0 100644 --- a/components/ui/label.tsx +++ b/components/ui/label.tsx @@ -1,14 +1,14 @@ -"use client" +'use client'; -import * as React from "react" -import * as LabelPrimitive from "@radix-ui/react-label" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from 'react'; +import * as LabelPrimitive from '@radix-ui/react-label'; +import { cva, type VariantProps } from 'class-variance-authority'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const labelVariants = cva( - "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" -) + 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70' +); const Label = React.forwardRef< React.ElementRef, @@ -20,7 +20,7 @@ const Label = React.forwardRef< className={cn(labelVariants(), className)} {...props} /> -)) -Label.displayName = LabelPrimitive.Root.displayName +)); +Label.displayName = LabelPrimitive.Root.displayName; -export { Label } +export { Label }; diff --git a/components/ui/select.tsx b/components/ui/select.tsx index cbe5a36..9f3ef21 100644 --- a/components/ui/select.tsx +++ b/components/ui/select.tsx @@ -1,16 +1,16 @@ -"use client" +'use client'; -import * as React from "react" -import * as SelectPrimitive from "@radix-ui/react-select" -import { Check, ChevronDown, ChevronUp } from "lucide-react" +import * as React from 'react'; +import * as SelectPrimitive from '@radix-ui/react-select'; +import { Check, ChevronDown, ChevronUp } from 'lucide-react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const Select = SelectPrimitive.Root +const Select = SelectPrimitive.Root; -const SelectGroup = SelectPrimitive.Group +const SelectGroup = SelectPrimitive.Group; -const SelectValue = SelectPrimitive.Value +const SelectValue = SelectPrimitive.Value; const SelectTrigger = React.forwardRef< React.ElementRef, @@ -19,7 +19,7 @@ const SelectTrigger = React.forwardRef< span]:line-clamp-1", + 'flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', className )} {...props} @@ -29,8 +29,8 @@ const SelectTrigger = React.forwardRef< -)) -SelectTrigger.displayName = SelectPrimitive.Trigger.displayName +)); +SelectTrigger.displayName = SelectPrimitive.Trigger.displayName; const SelectScrollUpButton = React.forwardRef< React.ElementRef, @@ -39,15 +39,15 @@ const SelectScrollUpButton = React.forwardRef< -)) -SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName +)); +SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName; const SelectScrollDownButton = React.forwardRef< React.ElementRef, @@ -56,28 +56,28 @@ const SelectScrollDownButton = React.forwardRef< -)) +)); SelectScrollDownButton.displayName = - SelectPrimitive.ScrollDownButton.displayName + SelectPrimitive.ScrollDownButton.displayName; const SelectContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, children, position = "popper", ...props }, ref) => ( +>(({ className, children, position = 'popper', ...props }, ref) => ( {children} @@ -96,8 +96,8 @@ const SelectContent = React.forwardRef< -)) -SelectContent.displayName = SelectPrimitive.Content.displayName +)); +SelectContent.displayName = SelectPrimitive.Content.displayName; const SelectLabel = React.forwardRef< React.ElementRef, @@ -105,11 +105,11 @@ const SelectLabel = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -SelectLabel.displayName = SelectPrimitive.Label.displayName +)); +SelectLabel.displayName = SelectPrimitive.Label.displayName; const SelectItem = React.forwardRef< React.ElementRef, @@ -118,7 +118,7 @@ const SelectItem = React.forwardRef< {children} -)) -SelectItem.displayName = SelectPrimitive.Item.displayName +)); +SelectItem.displayName = SelectPrimitive.Item.displayName; const SelectSeparator = React.forwardRef< React.ElementRef, @@ -140,11 +140,11 @@ const SelectSeparator = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -SelectSeparator.displayName = SelectPrimitive.Separator.displayName +)); +SelectSeparator.displayName = SelectPrimitive.Separator.displayName; export { Select, @@ -157,4 +157,4 @@ export { SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, -} +}; diff --git a/components/ui/separator.tsx b/components/ui/separator.tsx index 12d81c4..da04061 100644 --- a/components/ui/separator.tsx +++ b/components/ui/separator.tsx @@ -1,16 +1,16 @@ -"use client" +'use client'; -import * as React from "react" -import * as SeparatorPrimitive from "@radix-ui/react-separator" +import * as React from 'react'; +import * as SeparatorPrimitive from '@radix-ui/react-separator'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; const Separator = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >( ( - { className, orientation = "horizontal", decorative = true, ...props }, + { className, orientation = 'horizontal', decorative = true, ...props }, ref ) => ( ) -) -Separator.displayName = SeparatorPrimitive.Root.displayName +); +Separator.displayName = SeparatorPrimitive.Root.displayName; -export { Separator } +export { Separator }; diff --git a/components/ui/sheet.tsx b/components/ui/sheet.tsx index a37f17b..257a927 100644 --- a/components/ui/sheet.tsx +++ b/components/ui/sheet.tsx @@ -1,19 +1,19 @@ -"use client" +'use client'; -import * as React from "react" -import * as SheetPrimitive from "@radix-ui/react-dialog" -import { cva, type VariantProps } from "class-variance-authority" -import { X } from "lucide-react" +import * as React from 'react'; +import * as SheetPrimitive from '@radix-ui/react-dialog'; +import { cva, type VariantProps } from 'class-variance-authority'; +import { X } from 'lucide-react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; -const Sheet = SheetPrimitive.Root +const Sheet = SheetPrimitive.Root; -const SheetTrigger = SheetPrimitive.Trigger +const SheetTrigger = SheetPrimitive.Trigger; -const SheetClose = SheetPrimitive.Close +const SheetClose = SheetPrimitive.Close; -const SheetPortal = SheetPrimitive.Portal +const SheetPortal = SheetPrimitive.Portal; const SheetOverlay = React.forwardRef< React.ElementRef, @@ -21,33 +21,33 @@ const SheetOverlay = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -SheetOverlay.displayName = SheetPrimitive.Overlay.displayName +)); +SheetOverlay.displayName = SheetPrimitive.Overlay.displayName; const sheetVariants = cva( - "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", + 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500', { variants: { side: { - top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", + top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top', bottom: - "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", - left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", + 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom', + left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm', right: - "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", + 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm', }, }, defaultVariants: { - side: "right", + side: 'right', }, } -) +); interface SheetContentProps extends React.ComponentPropsWithoutRef, @@ -56,7 +56,7 @@ interface SheetContentProps const SheetContent = React.forwardRef< React.ElementRef, SheetContentProps ->(({ side = "right", className, children, ...props }, ref) => ( +>(({ side = 'right', className, children, ...props }, ref) => ( -)) -SheetContent.displayName = SheetPrimitive.Content.displayName +)); +SheetContent.displayName = SheetPrimitive.Content.displayName; const SheetHeader = ({ className, @@ -80,13 +80,13 @@ const SheetHeader = ({ }: React.HTMLAttributes) => (
-) -SheetHeader.displayName = "SheetHeader" +); +SheetHeader.displayName = 'SheetHeader'; const SheetFooter = ({ className, @@ -94,13 +94,13 @@ const SheetFooter = ({ }: React.HTMLAttributes) => (
-) -SheetFooter.displayName = "SheetFooter" +); +SheetFooter.displayName = 'SheetFooter'; const SheetTitle = React.forwardRef< React.ElementRef, @@ -108,11 +108,11 @@ const SheetTitle = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -SheetTitle.displayName = SheetPrimitive.Title.displayName +)); +SheetTitle.displayName = SheetPrimitive.Title.displayName; const SheetDescription = React.forwardRef< React.ElementRef, @@ -120,11 +120,11 @@ const SheetDescription = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -SheetDescription.displayName = SheetPrimitive.Description.displayName +)); +SheetDescription.displayName = SheetPrimitive.Description.displayName; export { Sheet, @@ -137,4 +137,4 @@ export { SheetFooter, SheetTitle, SheetDescription, -} +}; diff --git a/components/ui/skeleton.tsx b/components/ui/skeleton.tsx index 01b8b6d..a626d9b 100644 --- a/components/ui/skeleton.tsx +++ b/components/ui/skeleton.tsx @@ -1,4 +1,4 @@ -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function Skeleton({ className, @@ -6,10 +6,10 @@ function Skeleton({ }: React.HTMLAttributes) { return (
- ) + ); } -export { Skeleton } +export { Skeleton }; diff --git a/components/ui/textarea.tsx b/components/ui/textarea.tsx index 9f9a6dc..4ca0611 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 {} @@ -10,15 +10,15 @@ const Textarea = React.forwardRef( return (