Skip to content

Commit 8354fa8

Browse files
Georgi2704Ruben van Leeuwen
authored andcommitted
Resolved comments
1 parent 89c88f8 commit 8354fa8

File tree

14 files changed

+47
-126
lines changed

14 files changed

+47
-126
lines changed

frontend/apps/example/messages/en-GB.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

frontend/apps/example/messages/nl-NL.json

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { NextConfig } from 'next';
2-
import createNextIntlPlugin from 'next-intl/plugin';
1+
import type { NextConfig } from 'next';
32

4-
const nextConfig: NextConfig = {};
3+
const nextConfig: NextConfig = {
4+
/* config options here */
5+
};
56

6-
const withNextIntl = createNextIntlPlugin();
7-
export default withNextIntl(nextConfig);
7+
export default nextConfig;

frontend/apps/example/src/app/[locale]/useGetTranslationMessages.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

frontend/apps/example/src/app/[locale]/layout.tsx renamed to frontend/apps/example/src/app/layout.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import type { Metadata } from 'next';
22
import localFont from 'next/font/local';
33

4-
import { handleInvalidLocale } from '@/app/[locale]/useGetTranslationMessages';
5-
6-
import '../globals.css';
4+
import './globals.css';
75

86
const geistSans = localFont({
9-
src: '../fonts/GeistVF.woff',
7+
src: './fonts/GeistVF.woff',
108
variable: '--font-geist-sans',
119
weight: '100 900',
1210
});
1311
const geistMono = localFont({
14-
src: '../fonts/GeistMonoVF.woff',
12+
src: './fonts/GeistMonoVF.woff',
1513
variable: '--font-geist-mono',
1614
weight: '100 900',
1715
});
@@ -23,16 +21,11 @@ export const metadata: Metadata = {
2321

2422
export default async function RootLayout({
2523
children,
26-
params,
2724
}: Readonly<{
2825
children: React.ReactNode;
29-
params: Promise<{ locale: string }>;
3026
}>) {
31-
const { locale } = await params;
32-
const validLocale = handleInvalidLocale(locale);
33-
3427
return (
35-
<html lang={validLocale}>
28+
<html>
3629
<body className={`${geistSans.variable} ${geistMono.variable}`}>
3730
{children}
3831
</body>

frontend/apps/example/src/app/[locale]/page.tsx renamed to frontend/apps/example/src/app/page.tsx

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

3+
<<<<<<< HEAD:frontend/apps/example/src/app/[locale]/page.tsx
34
<<<<<<< HEAD
45
<<<<<<< HEAD
56
import { useParams } from 'next/navigation';
@@ -14,6 +15,10 @@ import {
1415
import { useParams } from 'next/navigation';
1516
>>>>>>> 305eba5 (prettier)
1617
import type {
18+
=======
19+
import {
20+
Locale,
21+
>>>>>>> faa8b5a (Resolved comments):frontend/apps/example/src/app/page.tsx
1722
PydanticComponentMatcher,
1823
PydanticFormApiProvider,
1924
PydanticFormCustomDataProvider,
@@ -25,6 +30,7 @@ import {
2530
PydanticFormFieldType,
2631
} from 'pydantic-forms';
2732

33+
<<<<<<< HEAD:frontend/apps/example/src/app/[locale]/page.tsx
2834
<<<<<<< HEAD
2935
<<<<<<< HEAD
3036
import { TextArea } from '@/fields';
@@ -38,11 +44,17 @@ import {
3844
handleInvalidLocale,
3945
useGetTranslationMessages,
4046
} from '@/app/[locale]/useGetTranslationMessages';
47+
=======
48+
>>>>>>> faa8b5a (Resolved comments):frontend/apps/example/src/app/page.tsx
4149
import { TextArea } from '@/fields';
4250
>>>>>>> 305eba5 (prettier)
4351

52+
<<<<<<< HEAD:frontend/apps/example/src/app/[locale]/page.tsx
4453
>>>>>>> 6b4540b (Cleanup)
4554
import styles from '../page.module.css';
55+
=======
56+
import styles from './page.module.css';
57+
>>>>>>> faa8b5a (Resolved comments):frontend/apps/example/src/app/page.tsx
4658

4759
<<<<<<< HEAD
4860
export default function Home({
@@ -54,10 +66,13 @@ export default function Home({
5466
const locale = params?.locale as string; // Get locale from URL params
5567
=======
5668
export default function Home() {
69+
<<<<<<< HEAD:frontend/apps/example/src/app/[locale]/page.tsx
5770
const { locale } = useParams();
5871
const validLocale = handleInvalidLocale(locale);
5972
>>>>>>> 6b4540b (Cleanup)
6073

74+
=======
75+
>>>>>>> faa8b5a (Resolved comments):frontend/apps/example/src/app/page.tsx
6176
const pydanticFormApiProvider: PydanticFormApiProvider = async ({
6277
requestBody,
6378
}) => {
@@ -126,15 +141,26 @@ export default function Home() {
126141
];
127142
};
128143

144+
<<<<<<< HEAD:frontend/apps/example/src/app/[locale]/page.tsx
129145
<<<<<<< HEAD
130146
// const translations = getMessages(locale);
131147
// console.log('NEW translations', translations);
132148

133149
=======
134150
>>>>>>> 6b4540b (Cleanup)
151+
=======
152+
const customTranslations = {
153+
renderForm: {
154+
loading: 'The form is loading. Please wait.',
155+
},
156+
};
157+
158+
const locale = Locale.enGB;
159+
160+
>>>>>>> faa8b5a (Resolved comments):frontend/apps/example/src/app/page.tsx
135161
return (
136162
<div className={styles.page}>
137-
<h1 style={{ marginBottom: '20px' }}>Pydantic Form ({locale})</h1>
163+
<h1 style={{ marginBottom: '20px' }}>Pydantic Form </h1>
138164

139165
<PydanticForm
140166
id="theForm"
@@ -149,6 +175,7 @@ export default function Home() {
149175
labelProvider: pydanticLabelProvider,
150176
customDataProvider: pydanticCustomDataProvider,
151177
componentMatcher: componentMatcher,
178+
<<<<<<< HEAD:frontend/apps/example/src/app/[locale]/page.tsx
152179
<<<<<<< HEAD
153180
<<<<<<< HEAD
154181
<<<<<<< HEAD
@@ -164,6 +191,10 @@ export default function Home() {
164191
translations: useGetTranslationMessages(validLocale), //Comment this line for default translations
165192
locale: validLocale,
166193
>>>>>>> 305eba5 (prettier)
194+
=======
195+
customTranslations: customTranslations,
196+
locale: locale,
197+
>>>>>>> faa8b5a (Resolved comments):frontend/apps/example/src/app/page.tsx
167198
}}
168199
/>
169200
</div>

frontend/apps/example/src/i18n/navigation.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

frontend/apps/example/src/i18n/request.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/apps/example/src/i18n/routing.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

frontend/apps/example/src/middleware.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)