From ec47be0c2bb2271522f443f11021c6df86280a98 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Thu, 30 Apr 2026 19:53:58 +0800 Subject: [PATCH] fix: add cn utility and fix import path in AntiCheatBadge --- components/anti-cheat-badge.tsx | 2 +- lib/utils.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 lib/utils.ts diff --git a/components/anti-cheat-badge.tsx b/components/anti-cheat-badge.tsx index bd009e6..5158c85 100644 --- a/components/anti-cheat-badge.tsx +++ b/components/anti-cheat-badge.tsx @@ -1,5 +1,5 @@ import { Shield, ShieldCheck, ShieldX, ShieldQuestion } from "lucide-react"; -import { cn } from "~/lib/utils"; +import { cn } from "@/lib/utils"; interface AntiCheatBadgeProps { antiCheatRelevant: boolean; diff --git a/lib/utils.ts b/lib/utils.ts new file mode 100644 index 0000000..a8c2287 --- /dev/null +++ b/lib/utils.ts @@ -0,0 +1,8 @@ +/** + * Simple class name utility that filters out falsy values and joins with spaces. + * This is a lightweight alternative to clsx/tailwind-merge for projects that + * don't need the full complexity of those libraries. + */ +export function cn(...inputs: (string | boolean | undefined | null)[]): string { + return inputs.filter(Boolean).join(" "); +}