File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
src/app/[locale]/case/[disputeId]/components Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
3
- import { getTranslations } from "next-intl/server" ;
3
+ import clsx from "clsx" ;
4
+ import { getLocale , getTranslations } from "next-intl/server" ;
4
5
import { headers } from "next/headers" ;
5
6
import Image from "next/image" ;
6
7
import Link from "next/link" ;
7
-
8
- import clsx from "clsx" ;
8
+ import { getLangDir } from "rtl-detect" ;
9
9
10
10
import { type StatusResponseType } from "@/app/api/dispute/[id]/status/query" ;
11
11
import { DisputeDetails } from "@/app/api/dispute/[id]/template/route" ;
@@ -40,6 +40,9 @@ const Question: React.FC<IQuestion> = async ({ disputeId }) => {
40
40
) . toString ( 16 ) } `;
41
41
42
42
const t = await getTranslations ( "case.question" ) ;
43
+ const locale = await getLocale ( ) ;
44
+
45
+ const langDir = getLangDir ( locale ) ;
43
46
44
47
return (
45
48
< div className = "space-y-6" >
@@ -77,7 +80,12 @@ const Question: React.FC<IQuestion> = async ({ disputeId }) => {
77
80
</ Link >
78
81
</ div >
79
82
) : null }
80
- < div className = "grid auto-cols-fr grid-flow-col divide-x-2 divide-stroke" >
83
+ < div
84
+ className = { clsx (
85
+ "grid auto-cols-fr grid-flow-col divide-x-2 divide-stroke" ,
86
+ langDir === "rtl" && "divide-x-reverse" ,
87
+ ) }
88
+ >
81
89
{ disputeDetails . answers . map ( ( answer ) => (
82
90
< div key = { answer . title } >
83
91
< div
You can’t perform that action at this time.
0 commit comments