Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/[locale]/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
@tailwind components;
@tailwind utilities;

:where(:lang(he)) {
direction: rtl;
}
:where(:lang(en)) {
direction: ltr;
}
@layer base {
html {
-webkit-tap-highlight-color: transparent;
Expand Down
7 changes: 5 additions & 2 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import Footer from '@/components/Footer/Footer';
import { HOST } from '@/config/consts';
import { unstable_setRequestLocale } from 'next-intl/server';
import { NextIntlClientProvider, useMessages } from 'next-intl';
import { Locale } from '../i18n';
import useTextDirection from '@/hooks/useTextDirection';

const birzia = Birzia({
src: [
Expand Down Expand Up @@ -60,13 +62,14 @@ export default function RootLayout({
params: { locale },
}: {
children: React.ReactNode;
params: { locale: string };
params: { locale: Locale };
}) {
unstable_setRequestLocale(locale);
const messages = useMessages();

const dir = useTextDirection();
return (
<html lang={locale} dir="rtl" suppressHydrationWarning={true}>
<html lang={locale} dir={dir} suppressHydrationWarning={true}>
<meta charSet="ISO-8859-1" />

<body
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function RootLayout({
params: { locale: string };
}) {
return (
<html lang={locale} dir="rtl">
<html lang={locale}>
<body>{children}</body>
</html>
);
Expand Down