Skip to content

Commit 01a0e96

Browse files
committed
fix: eslint报错
1 parent 4d41c2b commit 01a0e96

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

app/components/Community.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Button } from "../../components/ui/button";
2-
import { Card, CardContent } from "../../components/ui/card";
1+
import { Button } from "@/components/ui/button";
32
import {
43
ExternalLink,
54
MessageCircle,

app/components/Features.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
import React from "react";
22
import { Users, Zap, Heart } from "lucide-react";
33
import { Github as GithubIcon } from "./icons/Github";
4+
import { cn } from "@/lib/utils";
45

56
export function Features() {
6-
const features = [
7+
const features: {
8+
icon: React.ReactElement<{ className?: string }>;
9+
title: string;
10+
description: string;
11+
highlight: string;
12+
color: string;
13+
}[] = [
714
{
815
icon: <GithubIcon className="h-8 w-8 text-sky-500" />,
916
title: "完全开源",
@@ -64,8 +71,8 @@ export function Features() {
6471
<div className="w-16 h-16 border border-[var(--foreground)] flex items-center justify-center group-hover:bg-[var(--foreground)] group-hover:text-[var(--background)] transition-all duration-300">
6572
{/* Simplified icon styling */}
6673
<div className="p-0 text-[var(--foreground)] group-hover:text-[var(--background)]">
67-
{React.cloneElement(feature.icon as React.ReactElement, {
68-
className: "h-8 w-8",
74+
{React.cloneElement(feature.icon, {
75+
className: cn("h-8 w-8", feature.icon.props.className),
6976
})}
7077
</div>
7178
</div>

0 commit comments

Comments
 (0)