From 24757cad81518b65b3e6b93cb65ba4b7abdcdb39 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Nov 2024 06:21:42 +0000 Subject: [PATCH] chore: format code with Prettier --- apps/app/app/(routes)/[slug]/page.tsx | 7 +- apps/app/app/(routes)/settings/page.tsx | 20 +- apps/app/app/layout.tsx | 20 +- .../components/custom/infobar/bread-crumb.tsx | 52 +-- .../app/components/custom/infobar/infobar.tsx | 22 +- .../custom/section/section.label.tsx | 14 +- .../custom/settings/billing.settings.tsx | 15 +- .../custom/settings/theme.settings.tsx | 58 +-- .../app/components/custom/sidebar/sidebar.tsx | 77 ++-- apps/app/components/icons/themes/dark.tsx | 5 +- apps/app/components/icons/themes/light.tsx | 5 +- apps/app/components/icons/themes/system.tsx | 5 +- apps/app/components/ui/alert-dialog.tsx | 60 +-- apps/app/components/ui/alert.tsx | 24 +- apps/app/components/ui/avatar.tsx | 26 +- apps/app/components/ui/badge.tsx | 14 +- apps/app/components/ui/breadcrumb.tsx | 48 +-- apps/app/components/ui/button.tsx | 26 +- apps/app/components/ui/card.tsx | 39 +- apps/app/components/ui/chart.tsx | 172 ++++----- apps/app/components/ui/command.tsx | 64 ++-- apps/app/components/ui/dialog.tsx | 54 +-- apps/app/components/ui/dropdown-menu.tsx | 82 ++-- apps/app/components/ui/form.tsx | 103 ++--- apps/app/components/ui/hover-card.tsx | 20 +- apps/app/components/ui/input-otp.tsx | 38 +- apps/app/components/ui/input.tsx | 16 +- apps/app/components/ui/label.tsx | 20 +- apps/app/components/ui/scroll-area.tsx | 20 +- apps/app/components/ui/separator.tsx | 20 +- apps/app/components/ui/sheet.tsx | 56 +-- apps/app/components/ui/sidebar.tsx | 362 +++++++++--------- apps/app/components/ui/skeleton.tsx | 6 +- apps/app/components/ui/sonner.tsx | 16 +- apps/app/components/ui/tabs.tsx | 30 +- apps/app/components/ui/textarea.tsx | 16 +- apps/app/components/ui/toggle-group.tsx | 30 +- apps/app/components/ui/toggle.tsx | 20 +- apps/app/components/ui/tooltip.tsx | 22 +- apps/app/hooks/theme-provider.tsx | 11 +- apps/app/hooks/use-mobile.tsx | 24 +- apps/app/lib/utils.ts | 6 +- apps/app/tailwind.config.ts | 122 +++--- 43 files changed, 955 insertions(+), 912 deletions(-) diff --git a/apps/app/app/(routes)/[slug]/page.tsx b/apps/app/app/(routes)/[slug]/page.tsx index 4449a60..7d1488f 100644 --- a/apps/app/app/(routes)/[slug]/page.tsx +++ b/apps/app/app/(routes)/[slug]/page.tsx @@ -1,8 +1,3 @@ - export default function Home() { - return ( -
- Hii -
- ); + return
Hii
; } diff --git a/apps/app/app/(routes)/settings/page.tsx b/apps/app/app/(routes)/settings/page.tsx index fa77888..1e82be9 100644 --- a/apps/app/app/(routes)/settings/page.tsx +++ b/apps/app/app/(routes)/settings/page.tsx @@ -1,19 +1,19 @@ "use client"; -import Infobar from '@/components/custom/infobar/infobar' -import BillingSettings from '@/components/custom/settings/billing.settings'; -import ThemeSettings from '@/components/custom/settings/theme.settings'; -import React from 'react' +import Infobar from "@/components/custom/infobar/infobar"; +import BillingSettings from "@/components/custom/settings/billing.settings"; +import ThemeSettings from "@/components/custom/settings/theme.settings"; +import React from "react"; export default function SettingsPage() { return ( -
+
- +
-
- - +
+ +
- ) + ); } diff --git a/apps/app/app/layout.tsx b/apps/app/app/layout.tsx index df8bc3c..200710a 100644 --- a/apps/app/app/layout.tsx +++ b/apps/app/app/layout.tsx @@ -6,20 +6,18 @@ import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar"; import { AppSidebar } from "@/components/custom/sidebar/sidebar"; import { cookies } from "next/headers"; - export const metadata: Metadata = { title: "Plura", description: "Generated by create next app", }; - async function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { - const cookieStore = await cookies() - const defaultOpen = cookieStore.get("plura-sidebar:state")?.value === "true" + const cookieStore = await cookies(); + const defaultOpen = cookieStore.get("plura-sidebar:state")?.value === "true"; return ( @@ -32,12 +30,12 @@ async function RootLayout({ enableSystem disableTransitionOnChange > - - -
- {/* */} - {children} -
+ + +
+ {/* */} + {children} +
@@ -45,4 +43,4 @@ async function RootLayout({ ); } -export default RootLayout; \ No newline at end of file +export default RootLayout; diff --git a/apps/app/components/custom/infobar/bread-crumb.tsx b/apps/app/components/custom/infobar/bread-crumb.tsx index 083f25a..8e42715 100644 --- a/apps/app/components/custom/infobar/bread-crumb.tsx +++ b/apps/app/components/custom/infobar/bread-crumb.tsx @@ -1,15 +1,15 @@ -import { usePathname } from 'next/navigation' -import React from 'react' +import { usePathname } from "next/navigation"; +import React from "react"; export default function InfoBreadCrumb() { - const page = usePathname(); - return ( -
-
-

- {page.replace(/^\/+/, '')} -

- {/* {page === 'conversation' && chatRoom && ( + const page = usePathname(); + return ( +
+
+

+ {page.replace(/^\/+/, "")} +

+ {/* {page === 'conversation' && chatRoom && ( )} */} -
-

- {page == 'settings' - ? 'Manage your account settings, preferences and integrations' - : page == 'dashboard' - ? 'A detailed overview of your metrics, usage, customers and more' - : page == 'appointment' - ? 'View and edit all your appointments' - : page == 'email-marketing' - ? 'Send bulk emails to your customers' - : page == 'integration' - ? 'Connect third-party applications into Corinna-AI' - : 'Modify domain settings, change chatbot options, enter sales questions and train your bot to do what you want it to.'} -

-
- ) +
+

+ {page == "settings" + ? "Manage your account settings, preferences and integrations" + : page == "dashboard" + ? "A detailed overview of your metrics, usage, customers and more" + : page == "appointment" + ? "View and edit all your appointments" + : page == "email-marketing" + ? "Send bulk emails to your customers" + : page == "integration" + ? "Connect third-party applications into Corinna-AI" + : "Modify domain settings, change chatbot options, enter sales questions and train your bot to do what you want it to."} +

+
+ ); } diff --git a/apps/app/components/custom/infobar/infobar.tsx b/apps/app/components/custom/infobar/infobar.tsx index b1bb5a7..360406b 100644 --- a/apps/app/components/custom/infobar/infobar.tsx +++ b/apps/app/components/custom/infobar/infobar.tsx @@ -1,14 +1,14 @@ -import React from 'react' -import InfoBreadCrumb from './bread-crumb' -import { SidebarTrigger } from '@/components/ui/sidebar' +import React from "react"; +import InfoBreadCrumb from "./bread-crumb"; +import { SidebarTrigger } from "@/components/ui/sidebar"; export default function Infobar() { - return ( - - ) + return ( + + ); } diff --git a/apps/app/components/custom/section/section.label.tsx b/apps/app/components/custom/section/section.label.tsx index 14a141e..f5da5e3 100644 --- a/apps/app/components/custom/section/section.label.tsx +++ b/apps/app/components/custom/section/section.label.tsx @@ -1,14 +1,14 @@ -import React from 'react' +import React from "react"; interface SectionProps { - label: string - msg: string + label: string; + msg: string; } -export default function SectionLabel({label, msg}: SectionProps) { +export default function SectionLabel({ label, msg }: SectionProps) { return (
-

{label}

-

{msg}

+

{label}

+

{msg}

- ) + ); } diff --git a/apps/app/components/custom/settings/billing.settings.tsx b/apps/app/components/custom/settings/billing.settings.tsx index 7a4384e..d41942b 100644 --- a/apps/app/components/custom/settings/billing.settings.tsx +++ b/apps/app/components/custom/settings/billing.settings.tsx @@ -1,12 +1,15 @@ -import React from 'react' -import SectionLabel from '../section/section.label' +import React from "react"; +import SectionLabel from "../section/section.label"; export default function BillingSettings() { return ( -
-
- +
+
+
- ) + ); } diff --git a/apps/app/components/custom/settings/theme.settings.tsx b/apps/app/components/custom/settings/theme.settings.tsx index 3e36166..0267cfd 100644 --- a/apps/app/components/custom/settings/theme.settings.tsx +++ b/apps/app/components/custom/settings/theme.settings.tsx @@ -1,51 +1,57 @@ -'use client' +"use client"; -import { useTheme } from 'next-themes' -import { Skeleton } from '@/components/ui/skeleton' -import { cn } from '@/lib/utils' -import SectionLabel from '../section/section.label' -import { SystemMode } from '@/components/icons/themes/system' -import { LightMode } from '@/components/icons/themes/light' -import { DarkMode } from '@/components/icons/themes/dark' -import BlurFade from '@/components/ui/blur-fade' +import { useTheme } from "next-themes"; +import { Skeleton } from "@/components/ui/skeleton"; +import { cn } from "@/lib/utils"; +import SectionLabel from "../section/section.label"; +import { SystemMode } from "@/components/icons/themes/system"; +import { LightMode } from "@/components/icons/themes/light"; +import { DarkMode } from "@/components/icons/themes/dark"; +import BlurFade from "@/components/ui/blur-fade"; export default function Component() { - const { setTheme, theme } = useTheme() + const { setTheme, theme } = useTheme(); return (
- +
- + {theme ? ( <>
setTheme('system')} + onClick={() => setTheme("system")} > - +
setTheme('light')} + onClick={() => setTheme("light")} > - +
setTheme('dark')} + onClick={() => setTheme("dark")} > - +
) : ( @@ -63,5 +69,5 @@ export default function Component() { )}
- ) -} \ No newline at end of file + ); +} diff --git a/apps/app/components/custom/sidebar/sidebar.tsx b/apps/app/components/custom/sidebar/sidebar.tsx index 8664237..a2b81f3 100644 --- a/apps/app/components/custom/sidebar/sidebar.tsx +++ b/apps/app/components/custom/sidebar/sidebar.tsx @@ -1,4 +1,11 @@ -import { Calendar, ChevronDown, Home, Inbox, Search, Settings } from "lucide-react" +import { + Calendar, + ChevronDown, + Home, + Inbox, + Search, + Settings, +} from "lucide-react"; import { Sidebar, @@ -11,8 +18,13 @@ import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, -} from "@/components/ui/sidebar" -import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu" +} from "@/components/ui/sidebar"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; // Menu items. const items = [ @@ -41,36 +53,36 @@ const items = [ url: "#", icon: Settings, }, -] +]; export function AppSidebar() { return ( - - - -
- - - - Switch Account - - - - - - Acme Inc - - - Acme Corp. - - - - {/* {isExpanded && } */} -
-
-
-
+ + + +
+ + + + Switch Account + + + + + + Acme Inc + + + Acme Corp. + + + + {/* {isExpanded && } */} +
+
+
+
Application @@ -92,12 +104,11 @@ export function AppSidebar() { - + {/* {!isExpanded && } */} - + -
- ) + ); } diff --git a/apps/app/components/icons/themes/dark.tsx b/apps/app/components/icons/themes/dark.tsx index 4a95fe5..a134692 100644 --- a/apps/app/components/icons/themes/dark.tsx +++ b/apps/app/components/icons/themes/dark.tsx @@ -7,7 +7,8 @@ export const DarkMode = () => { height="193" viewBox="0 0 282 193" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { ); -}; \ No newline at end of file +}; diff --git a/apps/app/components/icons/themes/light.tsx b/apps/app/components/icons/themes/light.tsx index e2e698a..6a131d2 100644 --- a/apps/app/components/icons/themes/light.tsx +++ b/apps/app/components/icons/themes/light.tsx @@ -7,7 +7,8 @@ export const LightMode = () => { height="193" viewBox="0 0 282 193" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { ); -}; \ No newline at end of file +}; diff --git a/apps/app/components/icons/themes/system.tsx b/apps/app/components/icons/themes/system.tsx index ee4e83f..81165ad 100644 --- a/apps/app/components/icons/themes/system.tsx +++ b/apps/app/components/icons/themes/system.tsx @@ -7,7 +7,8 @@ export const SystemMode = () => { height="193" viewBox="0 0 282 193" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { ); -}; \ No newline at end of file +}; diff --git a/apps/app/components/ui/alert-dialog.tsx b/apps/app/components/ui/alert-dialog.tsx index 57760f2..f69596f 100644 --- a/apps/app/components/ui/alert-dialog.tsx +++ b/apps/app/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, @@ -19,13 +19,13 @@ const AlertDialogOverlay = React.forwardRef< -)) -AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName +)); +AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName; const AlertDialogContent = React.forwardRef< React.ElementRef, @@ -37,13 +37,13 @@ const AlertDialogContent = 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} /> -)) -AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName +)); +AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName; const AlertDialogHeader = ({ className, @@ -52,12 +52,12 @@ const AlertDialogHeader = ({
-) -AlertDialogHeader.displayName = "AlertDialogHeader" +); +AlertDialogHeader.displayName = "AlertDialogHeader"; const AlertDialogFooter = ({ className, @@ -66,12 +66,12 @@ const AlertDialogFooter = ({
-) -AlertDialogFooter.displayName = "AlertDialogFooter" +); +AlertDialogFooter.displayName = "AlertDialogFooter"; const AlertDialogTitle = React.forwardRef< React.ElementRef, @@ -82,8 +82,8 @@ const AlertDialogTitle = React.forwardRef< className={cn("text-lg font-semibold", className)} {...props} /> -)) -AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName +)); +AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName; const AlertDialogDescription = React.forwardRef< React.ElementRef, @@ -94,9 +94,9 @@ const AlertDialogDescription = React.forwardRef< className={cn("text-sm text-muted-foreground", className)} {...props} /> -)) +)); 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, @@ -119,12 +119,12 @@ const AlertDialogCancel = React.forwardRef< className={cn( buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", - className + className, )} {...props} /> -)) -AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName +)); +AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName; export { AlertDialog, @@ -138,4 +138,4 @@ export { AlertDialogDescription, AlertDialogAction, AlertDialogCancel, -} +}; diff --git a/apps/app/components/ui/alert.tsx b/apps/app/components/ui/alert.tsx index 5afd41d..1df0436 100644 --- a/apps/app/components/ui/alert.tsx +++ b/apps/app/components/ui/alert.tsx @@ -1,7 +1,7 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const alertVariants = cva( "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", @@ -16,8 +16,8 @@ const alertVariants = cva( defaultVariants: { variant: "default", }, - } -) + }, +); const Alert = React.forwardRef< HTMLDivElement, @@ -29,8 +29,8 @@ const Alert = React.forwardRef< className={cn(alertVariants({ variant }), className)} {...props} /> -)) -Alert.displayName = "Alert" +)); +Alert.displayName = "Alert"; const AlertTitle = React.forwardRef< HTMLParagraphElement, @@ -41,8 +41,8 @@ const AlertTitle = React.forwardRef< className={cn("mb-1 font-medium leading-none tracking-tight", className)} {...props} /> -)) -AlertTitle.displayName = "AlertTitle" +)); +AlertTitle.displayName = "AlertTitle"; const AlertDescription = React.forwardRef< HTMLParagraphElement, @@ -53,7 +53,7 @@ const AlertDescription = React.forwardRef< className={cn("text-sm [&_p]:leading-relaxed", className)} {...props} /> -)) -AlertDescription.displayName = "AlertDescription" +)); +AlertDescription.displayName = "AlertDescription"; -export { Alert, AlertTitle, AlertDescription } +export { Alert, AlertTitle, AlertDescription }; diff --git a/apps/app/components/ui/avatar.tsx b/apps/app/components/ui/avatar.tsx index 51e507b..09cd14d 100644 --- a/apps/app/components/ui/avatar.tsx +++ b/apps/app/components/ui/avatar.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as AvatarPrimitive from "@radix-ui/react-avatar" +import * as React from "react"; +import * as AvatarPrimitive from "@radix-ui/react-avatar"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Avatar = React.forwardRef< React.ElementRef, @@ -13,12 +13,12 @@ const Avatar = React.forwardRef< ref={ref} className={cn( "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", - className + className, )} {...props} /> -)) -Avatar.displayName = AvatarPrimitive.Root.displayName +)); +Avatar.displayName = AvatarPrimitive.Root.displayName; const AvatarImage = React.forwardRef< React.ElementRef, @@ -29,8 +29,8 @@ const AvatarImage = React.forwardRef< className={cn("aspect-square h-full w-full", className)} {...props} /> -)) -AvatarImage.displayName = AvatarPrimitive.Image.displayName +)); +AvatarImage.displayName = AvatarPrimitive.Image.displayName; const AvatarFallback = React.forwardRef< React.ElementRef, @@ -40,11 +40,11 @@ const AvatarFallback = React.forwardRef< ref={ref} className={cn( "flex h-full w-full items-center justify-center rounded-full bg-muted", - className + className, )} {...props} /> -)) -AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName +)); +AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName; -export { Avatar, AvatarImage, AvatarFallback } +export { Avatar, AvatarImage, AvatarFallback }; diff --git a/apps/app/components/ui/badge.tsx b/apps/app/components/ui/badge.tsx index e87d62b..f795980 100644 --- a/apps/app/components/ui/badge.tsx +++ b/apps/app/components/ui/badge.tsx @@ -1,7 +1,7 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const badgeVariants = cva( "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", @@ -20,8 +20,8 @@ const badgeVariants = cva( defaultVariants: { variant: "default", }, - } -) + }, +); export interface BadgeProps extends React.HTMLAttributes, @@ -30,7 +30,7 @@ export interface BadgeProps function Badge({ className, variant, ...props }: BadgeProps) { return (
- ) + ); } -export { Badge, badgeVariants } +export { Badge, badgeVariants }; diff --git a/apps/app/components/ui/breadcrumb.tsx b/apps/app/components/ui/breadcrumb.tsx index 60e6c96..ecfc6a4 100644 --- a/apps/app/components/ui/breadcrumb.tsx +++ b/apps/app/components/ui/breadcrumb.tsx @@ -1,16 +1,16 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { ChevronRight, MoreHorizontal } from "lucide-react" +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { ChevronRight, MoreHorizontal } from "lucide-react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Breadcrumb = React.forwardRef< HTMLElement, React.ComponentPropsWithoutRef<"nav"> & { - separator?: React.ReactNode + separator?: React.ReactNode; } ->(({ ...props }, ref) =>