feat: add featured flag to project, display featured projects on home page

This commit is contained in:
mstfyldz
2026-06-05 21:46:54 +03:00
parent 1f1bb8d913
commit 59b2afbc5a
6 changed files with 43 additions and 7 deletions
+4 -3
View File
@@ -146,7 +146,7 @@ function Label({ children }: { children: React.ReactNode }) {
);
}
export default function HomeClientBelowFold({ lang, dict }: { lang: Locale; dict: any }) {
export default function HomeClientBelowFold({ lang, dict, featuredProjects }: { lang: Locale; dict: any; featuredProjects?: any[] }) {
const [activeFaq, setActiveFaq] = useState<number | null>(null);
const [formSent, setFormSent] = useState(false);
const [hoverCase, setHoverCase] = useState<number | null>(null);
@@ -169,9 +169,10 @@ export default function HomeClientBelowFold({ lang, dict }: { lang: Locale; dict
}))
: [];
const caseStudies = (dict.work.items as any[]).map((item: any, idx: number) => ({
const rawCases = featuredProjects && featuredProjects.length > 0 ? featuredProjects : (dict.work.items as any[]);
const caseStudies = rawCases.map((item: any, idx: number) => ({
...item,
tech: [
tech: item.tech || [
["Python", "TensorFlow", "Next.js", "PostgreSQL"],
["Solidity", "React", "IPFS", "Node.js"],
["Flutter", "Firebase", "Django", "AWS"],