File tree Expand file tree Collapse file tree 2 files changed +45
-27
lines changed
app/[locale]/enterprise/_components Expand file tree Collapse file tree 2 files changed +45
-27
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,29 @@ import type { Case } from "../types"
6
6
7
7
import CaseCard from "./CaseCard"
8
8
9
- const CasesSwiper = ( { cases } : { cases : Case [ ] } ) => (
10
- < Swiper spaceBetween = { 8 } slidesPerView = { 1.2 } >
11
- { cases . map ( ( caseStudy ) => (
12
- < SwiperSlide
13
- key = { caseStudy . name }
14
- className = "first:ms-4 [&:last-child_div]:w-[calc(100%-2rem)]"
15
- >
16
- < CaseCard
17
- caseStudy = { caseStudy }
18
- className = "h-full w-full !shadow-none"
19
- />
20
- </ SwiperSlide >
21
- ) ) }
22
- </ Swiper >
23
- )
9
+ import { useBreakpointValue } from "@/hooks/useBreakpointValue"
10
+
11
+ const CasesSwiper = ( { cases } : { cases : Case [ ] } ) => {
12
+ const slidesPerView = useBreakpointValue ( {
13
+ base : 1.2 ,
14
+ sm : 2.4 ,
15
+ } )
16
+
17
+ return (
18
+ < Swiper spaceBetween = { 8 } slidesPerView = { slidesPerView } >
19
+ { cases . map ( ( caseStudy ) => (
20
+ < SwiperSlide
21
+ key = { caseStudy . name }
22
+ className = "first:ms-4 [&:last-child_div]:w-[calc(100%-2rem)]"
23
+ >
24
+ < CaseCard
25
+ caseStudy = { caseStudy }
26
+ className = "h-full w-full !shadow-none"
27
+ />
28
+ </ SwiperSlide >
29
+ ) ) }
30
+ </ Swiper >
31
+ )
32
+ }
24
33
25
34
export default CasesSwiper
Original file line number Diff line number Diff line change @@ -6,17 +6,26 @@ import type { Feature } from "../types"
6
6
7
7
import FeatureCard from "./FeatureCard"
8
8
9
- const FeaturesSwiper = ( { features } : { features : Feature [ ] } ) => (
10
- < Swiper spaceBetween = { 8 } slidesPerView = { 1.1 } >
11
- { features . map ( ( feature ) => (
12
- < SwiperSlide
13
- key = { feature . header }
14
- className = "first:ms-4 [&:last-child_div]:me-8"
15
- >
16
- < FeatureCard feature = { feature } className = "h-full !shadow-none" />
17
- </ SwiperSlide >
18
- ) ) }
19
- </ Swiper >
20
- )
9
+ import { useBreakpointValue } from "@/hooks/useBreakpointValue"
10
+
11
+ const FeaturesSwiper = ( { features } : { features : Feature [ ] } ) => {
12
+ const slidesPerView = useBreakpointValue ( {
13
+ base : 1.1 ,
14
+ sm : 1.5 ,
15
+ } )
16
+
17
+ return (
18
+ < Swiper spaceBetween = { 8 } slidesPerView = { slidesPerView } >
19
+ { features . map ( ( feature ) => (
20
+ < SwiperSlide
21
+ key = { feature . header }
22
+ className = "first:ms-4 [&:last-child_div]:me-8"
23
+ >
24
+ < FeatureCard feature = { feature } className = "h-full !shadow-none" />
25
+ </ SwiperSlide >
26
+ ) ) }
27
+ </ Swiper >
28
+ )
29
+ }
21
30
22
31
export default FeaturesSwiper
You can’t perform that action at this time.
0 commit comments