From e57491214e1086009deb985c92e7ada948a2ec29 Mon Sep 17 00:00:00 2001 From: Hank Stoever Date: Mon, 6 May 2024 17:35:38 -0700 Subject: [PATCH] fix: lint errors --- .../components/generator/contract-files.tsx | 10 +-- docs-site/src/components/ui/dialog.tsx | 82 ++++++++----------- 2 files changed, 37 insertions(+), 55 deletions(-) diff --git a/docs-site/src/components/generator/contract-files.tsx b/docs-site/src/components/generator/contract-files.tsx index e318cec..113d736 100644 --- a/docs-site/src/components/generator/contract-files.tsx +++ b/docs-site/src/components/generator/contract-files.tsx @@ -28,11 +28,11 @@ export function GeneratedContractFiles({ usageNode: React.ReactNode; clarityNode: React.ReactNode; }) { - const [loaded, setLoaded] = React.useState(false); - React.useEffect(() => { - setLoaded(true); - }, [setLoaded]); - if (!loaded) return null; + // const [loaded, setLoaded] = React.useState(false); + // React.useEffect(() => { + // setLoaded(true); + // }, [setLoaded]); + // if (!loaded) return null; return (
diff --git a/docs-site/src/components/ui/dialog.tsx b/docs-site/src/components/ui/dialog.tsx index 95b0d38..c4c193f 100644 --- a/docs-site/src/components/ui/dialog.tsx +++ b/docs-site/src/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 { Cross2Icon } from "@radix-ui/react-icons" +import * as React from 'react'; +import * as DialogPrimitive from '@radix-ui/react-dialog'; +import { Cross2Icon } from '@radix-ui/react-icons'; -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, @@ -21,13 +21,13 @@ const DialogOverlay = React.forwardRef< -)) -DialogOverlay.displayName = DialogPrimitive.Overlay.displayName +)); +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; const DialogContent = React.forwardRef< React.ElementRef, @@ -38,48 +38,33 @@ const DialogContent = React.forwardRef< {children} - - + + Close -)) -DialogContent.displayName = DialogPrimitive.Content.displayName +)); +DialogContent.displayName = DialogPrimitive.Content.displayName; -const DialogHeader = ({ - className, - ...props -}: React.HTMLAttributes) => ( -
-) -DialogHeader.displayName = "DialogHeader" +const DialogHeader = ({ className, ...props }: React.HTMLAttributes) => ( +
+); +DialogHeader.displayName = 'DialogHeader'; -const DialogFooter = ({ - className, - ...props -}: React.HTMLAttributes) => ( +const DialogFooter = ({ className, ...props }: React.HTMLAttributes) => (
-) -DialogFooter.displayName = "DialogFooter" +); +DialogFooter.displayName = 'DialogFooter'; const DialogTitle = React.forwardRef< React.ElementRef, @@ -87,14 +72,11 @@ const DialogTitle = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -DialogTitle.displayName = DialogPrimitive.Title.displayName +)); +DialogTitle.displayName = DialogPrimitive.Title.displayName; const DialogDescription = React.forwardRef< React.ElementRef, @@ -102,11 +84,11 @@ const DialogDescription = React.forwardRef< >(({ className, ...props }, ref) => ( -)) -DialogDescription.displayName = DialogPrimitive.Description.displayName +)); +DialogDescription.displayName = DialogPrimitive.Description.displayName; export { Dialog, @@ -119,4 +101,4 @@ export { DialogFooter, DialogTitle, DialogDescription, -} +};