-
-
+
);
-}
\ No newline at end of file
+}
diff --git a/src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx b/src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx
index 06fe62f..9936ad0 100644
--- a/src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx
+++ b/src/app/(app)/[lang]/sport/sportterem-igenyles/components/SportteremContent.tsx
@@ -5,199 +5,133 @@ import { parseFormattedText } from '@/utils/parseFormattedText';
interface SportteremContentData {
title: string;
description: string;
- facilities: {
- title: string;
- items: string[]
+ facilities: {
+ title: string;
+ items: string[];
};
- conditions: {
- title: string;
- description: string
+ conditions: {
+ title: string;
+ description: string;
};
- process: {
- title: string;
- description: string;
- warning: string
+ process: {
+ title: string;
+ description: string;
+ warning: string;
};
- requiredData: {
- title: string;
- intro: string;
- items: string[]
+ requiredData: {
+ title: string;
+ intro: string;
+ items: string[];
};
- selection: {
- title: string;
- intro: string;
- items: string[];
- warning: string
+ selection: {
+ title: string;
+ intro: string;
+ items: string[];
+ warning: string;
};
- usage: {
+ usage: {
title: string;
- items: string[]
+ items: string[];
};
- costs: {
- title: string;
- description: string;
- items: string[]
+ costs: {
+ title: string;
+ description: string;
+ items: string[];
};
- contact: {
- title: string;
- description: string
+ contact: {
+ title: string;
+ description: string;
};
footer: string;
}
-
export default function SportteremContent({ content }: { content: SportteremContentData }) {
return (
-
+
+
+
+
+
+
+ {parseFormattedText(content.conditions.description)}
+
- {/* Introduction */}
-
-
-
-
- {parseFormattedText(content.description)}
-
-
-
-
+
+ {parseFormattedText(content.process.description)}
+ {parseFormattedText(content.process.warning)}
+
- {/* Facilities */}
-
-
-
-
- {content.facilities.title}
-
-
-
- {content.facilities.items.map((item, i) => (
- - {parseFormattedText(item)}
- ))}
-
-
-
-
-
+
+ {parseFormattedText(content.requiredData.intro)}
+
+
- {/* Conditions */}
-
-
-
-
- {content.conditions.title}
-
-
{parseFormattedText(content.conditions.description)}
-
-
-
+
+ {parseFormattedText(content.selection.intro)}
+
+ {parseFormattedText(content.selection.warning)}
+
- {/* Process & Deadlines */}
-
-
-
-
- {content.process.title}
-
-
{parseFormattedText(content.process.description)}
-
- {parseFormattedText(content.process.warning)}
-
-
-
-
+
+
+
- {/* Required Data */}
-
-
-
-
- {content.requiredData.title}
-
-
{parseFormattedText(content.requiredData.intro)}
-
- {content.requiredData.items.map((item, i) => (
- - {parseFormattedText(item)}
- ))}
-
-
-
-
+
+ {parseFormattedText(content.costs.description)}
+
+
- {/* Selection Criteria */}
-
-
-
-
- {content.selection.title}
-
-
{parseFormattedText(content.selection.intro)}
-
- {content.selection.items.map((item, i) => (
- - {parseFormattedText(item)}
- ))}
-
-
- {parseFormattedText(content.selection.warning)}
-
-
-
-
+
+ {parseFormattedText(content.contact.description)}
+
- {/* Rules & usage */}
-
-
-
-
- {content.usage.title}
-
-
- {content.usage.items.map((item, i) => (
- - {parseFormattedText(item)}
- ))}
-
-
-
-
+
+ {parseFormattedText(content.footer)}
+
+
+ );
+}
- {/* Costs */}
-
-
-
-
- {content.costs.title}
-
-
{parseFormattedText(content.costs.description)}
-
- {content.costs.items.map((item, i) => (
- - {parseFormattedText(item)}
- ))}
-
-
-
-
+function SectionCard({ title, children }: { title: string; children: ReactNode }) {
+ return (
+
+
+
+ {title}
+
+
+
+ {children}
+
+
+
+ );
+}
- {/* Kapcsolattartás */}
-
-
-
-
- {content.contact.title}
-
-
{parseFormattedText(content.contact.description)}
-
-
-
+function Paragraph({ children }: { children: ReactNode }) {
+ return (
+
{children}
+ );
+}
-
{parseFormattedText(content.footer)}
+function TextList({ items, ordered = false }: { items: string[]; ordered?: boolean }) {
+ const ListTag = ordered ? 'ol' : 'ul';
-
+ return (
+
+ {items.map((item, index) => (
+
+ {parseFormattedText(item)}
+
+ ))}
+
);
-};
+}
-function Paragraph({ children }: { children: ReactNode }) {
+function WarningBox({ children }: { children: ReactNode }) {
return (
-
-
{children}
+
+ {children}
);
-}
\ No newline at end of file
+}
diff --git a/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx b/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx
index 8e17fb9..99733d2 100644
--- a/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx
+++ b/src/app/(app)/[lang]/sport/sportterem-igenyles/page.tsx
@@ -2,22 +2,28 @@ import { getDictionary } from '@/get-dictionary';
import type { Locale } from '@/i18n-config';
import SportteremContent from './components/SportteremContent';
import { PageHeader } from '@/components/common/PageHeader';
+import { parseFormattedText } from '@/utils/parseFormattedText';
+
type SportteremIgenylesPageProps = {
params: Promise<{ lang: Locale }>;
};
+
export default async function SportteremIgenylesPage({
params,
}: SportteremIgenylesPageProps) {
const { lang } = await params;
- const dictionary = await getDictionary(lang, 'sport');
+ const dictionary = await getDictionary(lang, 'sport');
+ const content = dictionary.sport.sportterem;
+
return (
-
+
);
-}
\ No newline at end of file
+}
diff --git a/src/components/common/PageHeader.tsx b/src/components/common/PageHeader.tsx
index 16c5c9d..c656887 100644
--- a/src/components/common/PageHeader.tsx
+++ b/src/components/common/PageHeader.tsx
@@ -7,8 +7,8 @@ import { ArrowLeft } from "lucide-react";
export interface PageHeaderProps {
title: string;
- subtitle?: string;
- description?: string; // fallback for subtitle (backward compatibility)
+ subtitle?: React.ReactNode;
+ description?: React.ReactNode; // fallback for subtitle (backward compatibility)
tags?: string[];
onBack?: () => void;
backHref?: string;