feat: add featured flag to project, display featured projects on home page
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user