Skip to content

Commit

Permalink
fix(platform): Build failure in platform (#385)
Browse files Browse the repository at this point in the history
Co-authored-by: Rajdip Bhattacharya <agentR47@gmail.com>
  • Loading branch information
DhairyaMajmudar and rajdip-b committed Sep 5, 2024
1 parent ab441db commit 90dcb2c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion apps/platform/src/app/api/health/route.ts
Original file line number Diff line number Diff line change
@@ -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 })
}
59 changes: 30 additions & 29 deletions apps/platform/src/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<React.ElementRef<typeof CommandPrimitive>>(
({ className, ...props }, ref) => (
<CommandPrimitive
className={cn(
'flex h-full w-full flex-col overflow-hidden rounded-md bg-[#161819] text-white dark:bg-zinc-950 dark:text-zinc-50',
className as string
)}
ref={ref}
{...props}
/>
)
)
const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
>(({ className, ...props }, ref) => (
<CommandPrimitive
className={cn(
'flex h-full w-full flex-col overflow-hidden rounded-md bg-[#161819] text-white dark:bg-zinc-950 dark:text-zinc-50',
className
)}
ref={ref}
{...props}
/>
))
Command.displayName = CommandPrimitive.displayName

export type CommandDialogProps = DialogProps
Expand All @@ -37,7 +38,8 @@ function CommandDialog({
}

const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
<div
className="flex items-center border-b border-white/10 px-3"
Expand All @@ -47,7 +49,7 @@ const CommandInput = React.forwardRef<
<CommandPrimitive.Input
className={cn(
'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-zinc-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-zinc-400',
className as string
className
)}
ref={ref}
{...props}
Expand All @@ -58,13 +60,11 @@ const CommandInput = React.forwardRef<
CommandInput.displayName = CommandPrimitive.Input.displayName

const CommandList = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.List>
React.ElementRef<typeof CommandPrimitive.List>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
>(({ className, ...props }, ref) => (
<CommandPrimitive.List
className={cn(
'max-h-[300px] overflow-y-auto overflow-x-hidden',
className as string
)}
className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}
ref={ref}
{...props}
/>
Expand All @@ -73,7 +73,8 @@ const CommandList = React.forwardRef<
CommandList.displayName = CommandPrimitive.List.displayName

const CommandEmpty = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Empty>
React.ElementRef<typeof CommandPrimitive.Empty>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
>((props, ref) => (
<CommandPrimitive.Empty
className="py-6 text-center text-sm"
Expand All @@ -85,12 +86,13 @@ const CommandEmpty = React.forwardRef<
CommandEmpty.displayName = CommandPrimitive.Empty.displayName

const CommandGroup = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Group>
React.ElementRef<typeof CommandPrimitive.Group>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Group
className={cn(
'overflow-hidden p-1 text-white dark:text-zinc-50 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-zinc-500 dark:[&_[cmdk-group-heading]]:text-zinc-400',
className as string
className
)}
ref={ref}
{...props}
Expand All @@ -100,26 +102,25 @@ const CommandGroup = React.forwardRef<
CommandGroup.displayName = CommandPrimitive.Group.displayName

const CommandSeparator = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Separator>
React.ElementRef<typeof CommandPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Separator
className={cn(
'-mx-1 h-px bg-white/30 dark:bg-zinc-800',
className as string
)}
className={cn('-mx-1 h-px bg-white/30 dark:bg-zinc-800', className)}
ref={ref}
{...props}
/>
))
CommandSeparator.displayName = CommandPrimitive.Separator.displayName

const CommandItem = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Item>
React.ElementRef<typeof CommandPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Item
className={cn(
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-white/20 aria-selected:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:aria-selected:bg-zinc-800 dark:aria-selected:text-zinc-50',
className as string
className
)}
ref={ref}
{...props}
Expand Down

0 comments on commit 90dcb2c

Please sign in to comment.