Skip to content

Commit a7e32db

Browse files
kiwicoppleclaude
andcommitted
Fix shadcn component files for Vercel build
- Recreate missing shadcn components (button, avatar, tabs, label) with proper lowercase naming - Remove old uppercase component files that were causing import conflicts - Update pnpm-lock.yaml with latest dependencies This resolves the Vercel build error where components couldn't be found due to case sensitivity issues between local (macOS) and Vercel (Linux). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ee7257f commit a7e32db

File tree

6 files changed

+1002
-2859
lines changed

6 files changed

+1002
-2859
lines changed

website/components/ui/Button.tsx

Lines changed: 0 additions & 56 deletions
This file was deleted.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as React from 'react'
2-
import * as AvatarPrimitive from '@radix-ui/react-avatar'
1+
import * as React from "react"
2+
import * as AvatarPrimitive from "@radix-ui/react-avatar"
33

4-
import { cn } from '~/lib/utils'
4+
import { cn } from "~/lib/utils"
55

66
const Avatar = React.forwardRef<
77
React.ElementRef<typeof AvatarPrimitive.Root>,
@@ -10,7 +10,7 @@ const Avatar = React.forwardRef<
1010
<AvatarPrimitive.Root
1111
ref={ref}
1212
className={cn(
13-
'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full',
13+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
1414
className
1515
)}
1616
{...props}
@@ -24,7 +24,7 @@ const AvatarImage = React.forwardRef<
2424
>(({ className, ...props }, ref) => (
2525
<AvatarPrimitive.Image
2626
ref={ref}
27-
className={cn('aspect-square h-full w-full', className)}
27+
className={cn("aspect-square h-full w-full", className)}
2828
{...props}
2929
/>
3030
))
@@ -37,7 +37,7 @@ const AvatarFallback = React.forwardRef<
3737
<AvatarPrimitive.Fallback
3838
ref={ref}
3939
className={cn(
40-
'flex h-full w-full items-center justify-center rounded-full bg-muted',
40+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
4141
className
4242
)}
4343
{...props}

website/components/ui/button.tsx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import * as React from "react"
2+
import { Slot } from "@radix-ui/react-slot"
3+
import { cva, type VariantProps } from "class-variance-authority"
4+
5+
import { cn } from "~/lib/utils"
6+
7+
const buttonVariants = cva(
8+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9+
{
10+
variants: {
11+
variant: {
12+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
13+
destructive:
14+
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
15+
outline:
16+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
17+
secondary:
18+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
19+
ghost: "hover:bg-accent hover:text-accent-foreground",
20+
link: "text-primary underline-offset-4 hover:underline",
21+
},
22+
size: {
23+
default: "h-10 px-4 py-2",
24+
sm: "h-9 rounded-md px-3",
25+
lg: "h-11 rounded-md px-8",
26+
icon: "h-10 w-10",
27+
},
28+
},
29+
defaultVariants: {
30+
variant: "default",
31+
size: "default",
32+
},
33+
}
34+
)
35+
36+
export interface ButtonProps
37+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
38+
VariantProps<typeof buttonVariants> {
39+
asChild?: boolean
40+
}
41+
42+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
43+
({ className, variant, size, asChild = false, ...props }, ref) => {
44+
const Comp = asChild ? Slot : "button"
45+
return (
46+
<Comp
47+
className={cn(buttonVariants({ variant, size, className }))}
48+
ref={ref}
49+
{...props}
50+
/>
51+
)
52+
}
53+
)
54+
Button.displayName = "Button"
55+
56+
export { Button, buttonVariants }
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import * as React from 'react'
2-
import * as LabelPrimitive from '@radix-ui/react-label'
3-
import { cva, type VariantProps } from 'class-variance-authority'
1+
import * as React from "react"
2+
import * as LabelPrimitive from "@radix-ui/react-label"
3+
import { cva, type VariantProps } from "class-variance-authority"
44

5-
import { cn } from '~/lib/utils'
5+
import { cn } from "~/lib/utils"
66

77
const labelVariants = cva(
8-
'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'
8+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
99
)
1010

1111
const Label = React.forwardRef<
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as React from 'react'
2-
import * as TabsPrimitive from '@radix-ui/react-tabs'
1+
import * as React from "react"
2+
import * as TabsPrimitive from "@radix-ui/react-tabs"
33

4-
import { cn } from '~/lib/utils'
4+
import { cn } from "~/lib/utils"
55

66
const Tabs = TabsPrimitive.Root
77

@@ -12,7 +12,7 @@ const TabsList = React.forwardRef<
1212
<TabsPrimitive.List
1313
ref={ref}
1414
className={cn(
15-
'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',
15+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
1616
className
1717
)}
1818
{...props}
@@ -27,7 +27,7 @@ const TabsTrigger = React.forwardRef<
2727
<TabsPrimitive.Trigger
2828
ref={ref}
2929
className={cn(
30-
'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',
30+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
3131
className
3232
)}
3333
{...props}
@@ -42,7 +42,7 @@ const TabsContent = React.forwardRef<
4242
<TabsPrimitive.Content
4343
ref={ref}
4444
className={cn(
45-
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
45+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
4646
className
4747
)}
4848
{...props}

0 commit comments

Comments
 (0)