From 90dcb2c6f6cb3d89705f4374e66a7f1dc098b0c2 Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <124715224+DhairyaMajmudar@users.noreply.github.com> Date: Sat, 24 Aug 2024 21:00:40 +0530 Subject: [PATCH] fix(platform): Build failure in platform (#385) Co-authored-by: Rajdip Bhattacharya --- 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) => (