Skip to content

Commit f24a3c4

Browse files
authored
fixed the issue of less than two testimonials (#69)
1 parent f236879 commit f24a3c4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/components/DeveloperTestimonials.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,13 @@ const ReviewCard = ({
7272
};
7373

7474
export function DeveloperTestimonials() {
75-
const firstRow = developertestimonials.slice(
76-
0,
77-
Math.ceil(developertestimonials.length / 2),
78-
);
75+
const firstRow =
76+
developertestimonials.length > 2
77+
? developertestimonials.slice(
78+
0,
79+
Math.ceil(developertestimonials.length / 2),
80+
)
81+
: developertestimonials;
7982

8083
return (
8184
<div className="w-full p-6">

0 commit comments

Comments
 (0)