Skip to content

Commit 288d49d

Browse files
committed
fix: use empty string fallback classname
1 parent 1545524 commit 288d49d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hooks/useRtlFlip.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { isLangRightToLeft } from "@/lib/utils/translations"
66

77
type UseDirection = {
88
flipForRtl: "scaleX(-1)" | undefined // transform (deprecated)
9-
twFlipForRtl: "-scale-x-1" | undefined // className
9+
twFlipForRtl: "-scale-x-1" | "" // className
1010
isRtl: boolean
1111
direction: "ltr" | "rtl"
1212
}
@@ -21,7 +21,7 @@ export const useRtlFlip = (): UseDirection => {
2121
const isRtl = isLangRightToLeft(locale as Lang)
2222
return {
2323
flipForRtl: isRtl ? "scaleX(-1)" : undefined, // transform (deprecated)
24-
twFlipForRtl: isRtl ? "-scale-x-1" : undefined, // className (preferred)
24+
twFlipForRtl: isRtl ? "-scale-x-1" : "", // className (preferred)
2525
isRtl,
2626
direction: isRtl ? "rtl" : "ltr",
2727
}

0 commit comments

Comments
 (0)