We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d44637d commit 2623256Copy full SHA for 2623256
1 file changed
src/components/sections/FeaturedProjects.tsx
@@ -25,11 +25,9 @@ export function FeaturedProjects({ projects }: FeaturedProjectsProps) {
25
const projectCount = projects?.length || 0;
26
const gridClasses = getGridClasses(projectCount);
27
28
- // Show only first 3 projects initially, or all if less than 4
29
- const initialProjects = projects?.slice(0, 3) || [];
30
- const remainingProjects = projects?.slice(3) || [];
31
- const shouldShowMoreButton = projectCount > 3;
32
- const displayedProjects = showAllProjects ? projects : initialProjects;
+ const shouldShowInTwoRows = projectCount == 4;
+ const shouldShowMoreButton = !shouldShowInTwoRows && projectCount > 3;
+ const initialProjects = projects?.slice(0, shouldShowInTwoRows? 4: 3) || [];
33
34
return (
35
<section
0 commit comments