Skip to content

Commit

Permalink
Fix production build error
Browse files Browse the repository at this point in the history
  • Loading branch information
jhodapp committed Dec 23, 2024
1 parent 037b833 commit 02ab644
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 30 deletions.
24 changes: 6 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"next": "15.1.2",
"next-themes": "^0.4.4",
"react": "^19.0.0",
"react-day-picker": "^9.4.4",
"react-day-picker": "^8.10.1",
"react-dom": "^19.0.0",
"sass": "^1.81.0",
"swr": "^2.2.6-beta.4",
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"

const buttonVariants = cva(
"inline-flex items-center justify-center 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",
"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",
{
variants: {
variant: {
Expand Down
10 changes: 7 additions & 3 deletions src/components/ui/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,20 @@ function Calendar({
"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
day_today: "bg-accent text-accent-foreground",
day_outside:
"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
day_disabled: "text-muted-foreground opacity-50",
day_range_middle:
"aria-selected:bg-accent aria-selected:text-accent-foreground",
day_hidden: "invisible",
...classNames,
}}
components={{
IconLeft: ({ ...props }) => <ChevronLeft className="h-4 w-4" />,
IconRight: ({ ...props }) => <ChevronRight className="h-4 w-4" />,
IconLeft: ({ className, ...props }) => (
<ChevronLeft className={cn("h-4 w-4", className)} {...props} />
),
IconRight: ({ className, ...props }) => (
<ChevronRight className={cn("h-4 w-4", className)} {...props} />
),
}}
{...props}
/>
Expand Down
20 changes: 13 additions & 7 deletions src/components/ui/providers.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
"use client"
"use client";

import * as React from "react"
import { ThemeProvider as NextThemesProvider } from "next-themes"
import { ThemeProviderProps } from "next-themes/dist/types"
import * as React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes";

import { TooltipProvider } from "@/components/ui/tooltip"
import { TooltipProvider } from "@/components/ui/tooltip";

// Works around breaking change introduced in [email protected], see:
// https://github.com/shadcn-ui/ui/issues/5706
interface ThemeProviderProps {
children: React.ReactNode;
[key: string]: any;
}

export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return (
<NextThemesProvider {...props}>
<TooltipProvider>{children}</TooltipProvider>
</NextThemesProvider>
)
}
);
}

0 comments on commit 02ab644

Please sign in to comment.