Skip to content

Commit 0bcf4d2

Browse files
committed
fix(temp): force roadmap release carousel to LTR
1 parent c4e91fe commit 0bcf4d2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

app/[locale]/roadmap/_components/ReleaseCarousel.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"use client"
22

3+
// TODO: Extract intl strings
4+
// TODO: Fix RTL compatibility; currenly forced to LTR flow
5+
36
import { useEffect, useState } from "react"
47

58
import { Image } from "@/components/Image"
@@ -73,7 +76,7 @@ const ReleaseCarousel = () => {
7376
}, [api1, api2])
7477

7578
return (
76-
<div className="w-full max-w-[100vw] overflow-hidden">
79+
<div className="w-full max-w-[100vw] overflow-hidden" dir="ltr">
7780
<div className="mx-auto w-full max-w-screen-2xl px-4 sm:px-6">
7881
<div className="w-full rounded-2xl bg-background-highlight py-6">
7982
<div className="flex flex-col gap-6">
@@ -84,6 +87,7 @@ const ReleaseCarousel = () => {
8487
opts={{
8588
align: "center",
8689
containScroll: false,
90+
direction: "ltr",
8791
loop: false,
8892
startIndex: findLatestReleaseIndex(),
8993
}}
@@ -202,6 +206,7 @@ const ReleaseCarousel = () => {
202206
opts={{
203207
align: "center",
204208
containScroll: false,
209+
direction: "ltr",
205210
loop: false,
206211
startIndex: findLatestReleaseIndex(),
207212
}}

src/components/ui/carousel.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
// TODO: Fix RTL compatibility
2+
13
import * as React from "react"
24
import useEmblaCarousel, {
35
type UseEmblaCarouselType,
46
} from "embla-carousel-react"
7+
import { MdChevronLeft, MdChevronRight } from "react-icons/md"
58

6-
import { ChevronNext, ChevronPrev } from "@/components/Chevron"
79
import { Button } from "@/components/ui/buttons/Button"
810

911
import { cn } from "@/lib/utils/cn"
@@ -215,7 +217,7 @@ const CarouselPrevious = React.forwardRef<
215217
onClick={scrollPrev}
216218
{...props}
217219
>
218-
<ChevronPrev className="h-8 w-8" />
220+
<MdChevronLeft className="h-8 w-8" />
219221
<span className="sr-only">Previous slide</span>
220222
</Button>
221223
)
@@ -244,7 +246,7 @@ const CarouselNext = React.forwardRef<
244246
onClick={scrollNext}
245247
{...props}
246248
>
247-
<ChevronNext className="h-8 w-8" />
249+
<MdChevronRight className="h-8 w-8" />
248250
<span className="sr-only">Next slide</span>
249251
</Button>
250252
)

0 commit comments

Comments
 (0)