Skip to content

Commit ba62970

Browse files
committed
feat: fixed dyamic component issue
1 parent 30175c3 commit ba62970

4 files changed

Lines changed: 29 additions & 39 deletions

File tree

optiblogai-site/package-lock.json

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

optiblogai-site/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"dependencies": {
1212
"clsx": "^2.1.1",
1313
"framer-motion": "^12.23.5",
14-
"lottie-react": "^2.4.1",
1514
"lucide-react": "^0.525.0",
1615
"next": "15.4.1",
1716
"react": "19.1.0",

optiblogai-site/src/app/components/homepage/FeatureHighlights.tsx

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ import { Card, CardContent } from "@/app/components/ui/card";
55
import { ChevronLeft, ChevronRight, Play, Pause } from "lucide-react";
66
import { cn } from "@/app/lib/utils";
77

8+
import LiveEditorPreview from "@/app/components/FeaturePreviews/LiveEditorPreview";
9+
import PerformanceAnalyticsPreview from "@/app/components/FeaturePreviews/PerformanceAnalyticsPreview";
10+
import TeamCollaborationPreview from "@/app/components/FeaturePreviews/TeamCollaborationPreview";
11+
import SEOOptimizationPreview from "@/app/components/FeaturePreviews/SEOOptimizationPreview";
12+
813
interface Feature {
914
id: string;
1015
title: string;
1116
description: string;
1217
image: string;
1318
points: string[];
1419
color: string;
20+
Component : React.FC;
1521
}
1622

1723
const FeatureHighlights: React.FC = () => {
@@ -32,6 +38,7 @@ const FeatureHighlights: React.FC = () => {
3238
"Plagiarism detection",
3339
],
3440
color: "bg-gradient-to-br from-[var(--color-primary)] to-blue-600",
41+
Component: LiveEditorPreview,
3542
},
3643
{
3744
id: "seo-optimization",
@@ -46,6 +53,7 @@ const FeatureHighlights: React.FC = () => {
4653
"SERP preview",
4754
],
4855
color: "bg-gradient-to-br from-[var(--color-secondary)] to-green-600",
56+
Component: SEOOptimizationPreview,
4957
},
5058
{
5159
id: "analytics",
@@ -60,6 +68,7 @@ const FeatureHighlights: React.FC = () => {
6068
"Growth insights",
6169
],
6270
color: "bg-gradient-to-br from-[var(--color-accent)] to-orange-600",
71+
Component: PerformanceAnalyticsPreview,
6372
},
6473
{
6574
id: "collaboration",
@@ -74,6 +83,7 @@ const FeatureHighlights: React.FC = () => {
7483
"Role-based permissions",
7584
],
7685
color: "bg-gradient-to-br from-purple-600 to-pink-600",
86+
Component: TeamCollaborationPreview,
7787
},
7888
];
7989

@@ -94,7 +104,7 @@ const FeatureHighlights: React.FC = () => {
94104
if (!isPlaying) return;
95105
const interval = setInterval(() => {
96106
nextFeature();
97-
}, 5000);
107+
}, 10000);
98108
return () => clearInterval(interval);
99109
}, [isPlaying]);
100110

@@ -180,21 +190,22 @@ const FeatureHighlights: React.FC = () => {
180190
</button>
181191
</div>
182192
</div>
183-
193+
184194
{/* Feature Image */}
185195
<div className="order-1 lg:order-2">
186-
<Card className="shadow-xl overflow-hidden">
187-
<CardContent className="p-0">
188-
<img
189-
src={features[activeFeature].image}
190-
alt={features[activeFeature].title}
191-
className="w-full h-auto object-cover"
192-
/>
193-
194-
</CardContent>
195-
</Card>
196+
{(() => {
197+
const DynamicPreview = features[activeFeature].Component;
198+
return (
199+
<Card className="shadow-xl overflow-hidden">
200+
<CardContent className="p-0">
201+
<DynamicPreview />
202+
</CardContent>
203+
</Card>
204+
);
205+
})()}
196206
</div>
197-
</div>
207+
</div>
208+
198209
</div>
199210
</section>
200211
);

optiblogai-site/src/app/components/homepage/GettingStartedCTA.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,17 @@ const GettingStartedCTA: React.FC = () => {
134134
</div>
135135
</div>
136136

137-
<div className="bg-gradient-to-br from-[var(--color-primary)] to-[var(--color-secondary)] rounded-xl p-8 text-center">
138-
<div className="text-4xl font-bold text-primary mb-2">100%</div>
139-
<div className="text-lg font-semibold text-gray-900 mb-2">Free & Open Source</div>
140-
<p className="text-gray-600 mb-6">
137+
<div className="bg-gradient-to-br from-[var(--color-primary)] to-[var(--color-secondary)] rounded-xl text-white p-8 text-center">
138+
<div className="text-4xl text-white font-bold mb-2">100%</div>
139+
<div className="text-lg font-semibold text-white mb-2">Free & Open Source</div>
140+
<p className="text-gray-white mb-6">
141141
No hidden costs, no vendor lock-in. Use OptiBlogAi however you want, whenever you want.
142142
</p>
143143
<a
144144
href={SITE_CONFIG.links.github}
145145
target="_blank"
146146
rel="noopener noreferrer"
147-
className="inline-flex items-center text-primary hover:text-primary/80 font-medium"
147+
className="inline-flex items-center text-white font-medium"
148148
>
149149
Star us on GitHub
150150
<ArrowRight className="w-4 h-4 ml-2" />

0 commit comments

Comments
 (0)