Skip to content

Commit 70a7c18

Browse files
committed
feat: formatting
1 parent 19e52b6 commit 70a7c18

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

app/[locale]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface LocaleLayoutProps {
2727
}
2828

2929
export function generateStaticParams() {
30-
return routing.locales.map((locale) => ({locale}));
30+
return routing.locales.map((locale) => ({ locale }));
3131
}
3232

3333
export default async function LocaleLayout({

i18n/request.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@ import { getRequestConfig } from "next-intl/server";
22
import { routing } from "./routing";
33

44
export default getRequestConfig(async ({ requestLocale }) => {
5-
// This typically corresponds to the `[locale]` segment
65
let locale = await requestLocale;
76

8-
// Ensure that a valid locale is used
97
if (!locale || !routing.locales.includes(locale as any)) {
108
locale = routing.defaultLocale;
119
}
1210

13-
if (process.env.NODE_ENV === 'development') {
14-
const res = await fetch(`${process.env.TOLGEE_API_URL}/v2/projects/${process.env.TOLGEE_PROJECT_ID}/translations/${locale}`, {
15-
headers: {
16-
'x-api-key': `${process.env.TOLGEE_API_KEY}`,
11+
if (process.env.NODE_ENV === "development") {
12+
const res = await fetch(
13+
`${process.env.TOLGEE_API_URL}/v2/projects/${process.env.TOLGEE_PROJECT_ID}/translations/${locale}`,
14+
{
15+
headers: {
16+
"x-api-key": `${process.env.TOLGEE_API_KEY}`,
17+
},
1718
},
18-
});
19+
);
1920
const data = await res.json();
2021
const messages = data[locale];
2122

postcss.config.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const config = {
2-
plugins: {
3-
"@tailwindcss/postcss": {},
4-
},
2+
plugins: {
3+
"@tailwindcss/postcss": {},
4+
},
55
};
6-
export default config;
6+
export default config;

0 commit comments

Comments
 (0)