From 6e44c63073c1a698d7f59a42aa61953a795e107b Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Sat, 27 Jul 2024 20:42:15 +0530 Subject: [PATCH 1/2] fix: removing build fails --- apps/platform/src/app/api/health/route.ts | 2 +- apps/platform/src/components/ui/command.tsx | 59 +++++++++++---------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/apps/platform/src/app/api/health/route.ts b/apps/platform/src/app/api/health/route.ts index 9b1fdf11..19e7ced4 100644 --- a/apps/platform/src/app/api/health/route.ts +++ b/apps/platform/src/app/api/health/route.ts @@ -1,5 +1,5 @@ import { NextResponse } from 'next/server' -export function GET(): unknown { +export function GET(): NextResponse { return NextResponse.json({ message: 'Hello World' }, { status: 200 }) } diff --git a/apps/platform/src/components/ui/command.tsx b/apps/platform/src/components/ui/command.tsx index 9203ee20..3757984e 100644 --- a/apps/platform/src/components/ui/command.tsx +++ b/apps/platform/src/components/ui/command.tsx @@ -5,18 +5,19 @@ import { Search } from 'lucide-react' import { cn } from '@/lib/utils' import { Dialog, DialogContent } from '@/components/ui/dialog' -const Command = React.forwardRef>( - ({ className, ...props }, ref) => ( - - ) -) +const Command = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) Command.displayName = CommandPrimitive.displayName export type CommandDialogProps = DialogProps @@ -37,7 +38,8 @@ function CommandDialog({ } const CommandInput = React.forwardRef< - React.ElementRef + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => (
+ React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( @@ -73,7 +73,8 @@ const CommandList = React.forwardRef< CommandList.displayName = CommandPrimitive.List.displayName const CommandEmpty = React.forwardRef< - React.ElementRef + React.ElementRef, + React.ComponentPropsWithoutRef >((props, ref) => ( + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( @@ -114,12 +114,13 @@ const CommandSeparator = React.forwardRef< CommandSeparator.displayName = CommandPrimitive.Separator.displayName const CommandItem = React.forwardRef< - React.ElementRef + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( Date: Sat, 27 Jul 2024 20:42:15 +0530 Subject: [PATCH 2/2] fix: removing build fails --- apps/platform/src/app/api/health/route.ts | 2 +- apps/platform/src/components/ui/command.tsx | 59 +++++++++++---------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/apps/platform/src/app/api/health/route.ts b/apps/platform/src/app/api/health/route.ts index 9b1fdf11..19e7ced4 100644 --- a/apps/platform/src/app/api/health/route.ts +++ b/apps/platform/src/app/api/health/route.ts @@ -1,5 +1,5 @@ import { NextResponse } from 'next/server' -export function GET(): unknown { +export function GET(): NextResponse { return NextResponse.json({ message: 'Hello World' }, { status: 200 }) } diff --git a/apps/platform/src/components/ui/command.tsx b/apps/platform/src/components/ui/command.tsx index 9203ee20..3757984e 100644 --- a/apps/platform/src/components/ui/command.tsx +++ b/apps/platform/src/components/ui/command.tsx @@ -5,18 +5,19 @@ import { Search } from 'lucide-react' import { cn } from '@/lib/utils' import { Dialog, DialogContent } from '@/components/ui/dialog' -const Command = React.forwardRef>( - ({ className, ...props }, ref) => ( - - ) -) +const Command = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) Command.displayName = CommandPrimitive.displayName export type CommandDialogProps = DialogProps @@ -37,7 +38,8 @@ function CommandDialog({ } const CommandInput = React.forwardRef< - React.ElementRef + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => (
+ React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( @@ -73,7 +73,8 @@ const CommandList = React.forwardRef< CommandList.displayName = CommandPrimitive.List.displayName const CommandEmpty = React.forwardRef< - React.ElementRef + React.ElementRef, + React.ComponentPropsWithoutRef >((props, ref) => ( + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( @@ -114,12 +114,13 @@ const CommandSeparator = React.forwardRef< CommandSeparator.displayName = CommandPrimitive.Separator.displayName const CommandItem = React.forwardRef< - React.ElementRef + React.ElementRef, + React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => (