diff --git a/src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx b/src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx
index 2e2e2da..f832095 100644
--- a/src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx
+++ b/src/app/(app)/[lang]/sport/sportpalya-tamogatas/components/GymSupportContent.tsx
@@ -1,6 +1,6 @@
-import React, {ReactNode} from 'react';
+import { ReactNode } from 'react';
import { Card, CardContent } from '@/components/ui/card';
-import { parseFormattedText } from '@/utils/parseFormattedText';
+import { parseFormattedText } from '@/utils/parseFormattedText';
interface SportpalyaTamogatasContentData {
title: string;
@@ -34,109 +34,77 @@ interface SportpalyaTamogatasContentData {
export default function SportpalyaTamogatasContent({ content }: { content: SportpalyaTamogatasContentData }) {
return (
-
- {/* Introduction */}
-
-
-
-
- {parseFormattedText(content.description)}
-
-
-
-
+
+
+ {parseFormattedText(content.application.description)}
+
- {/* Application */}
-
-
-
-
- {content.application.title}
-
-
{parseFormattedText(content.application.description)}
-
-
-
+
+
+
- {/* Support Period and Location */}
-
-
-
-
- {content.period.title}
-
-
-
- {content.period.items.map((item, i) => (
- - {parseFormattedText(item)}
- ))}
-
-
-
-
-
+
+ {parseFormattedText(content.condition.intro)}
+
+ {parseFormattedText(content.condition.outro)}
+
- {/* Conditions */}
-
-
-
-
- {content.condition.title}
-
-
{parseFormattedText(content.condition.intro)}
-
- {content.condition.items.map((item, i) => (
- - {parseFormattedText(item)}
- ))}
-
-
- {parseFormattedText(content.condition.outro)}
-
-
-
-
+
+ {parseFormattedText(content.selection.description)}
+
+
- {/* Selection */}
-
-
-
-
- {content.selection.title}
-
-
{parseFormattedText(content.selection.description)}
-
- {content.selection.items.map((item, i) => (
- - {parseFormattedText(item)}
- ))}
-
-
-
-
+
+
+
- {/* Result */}
-
-
-
-
- {content.result.title}
-
-
- {content.result.items.map((item, i) => (
- - {parseFormattedText(item)}
- ))}
-
-
-
-
-
{parseFormattedText(content.footer)}
+
+ {parseFormattedText(content.footer)}
+
);
};
+function SectionCard({ title, children }: { title: string; children: ReactNode }) {
+ return (
+
+
+
+ {title}
+
+
+
+ {children}
+
+
+
+ );
+}
+
function Paragraph({ children }: { children: ReactNode }) {
return (
-
-
{children}
+
{children}
+ );
+}
+
+function TextList({ items, ordered = false }: { items: string[]; ordered?: boolean }) {
+ const ListTag = ordered ? 'ol' : 'ul';
+
+ return (
+
+ {items.map((item, index) => (
+
+ {parseFormattedText(item)}
+
+ ))}
+
+ );
+}
+
+function NoticeBox({ children }: { children: ReactNode }) {
+ return (
+
+ {children}
);
-}
\ No newline at end of file
+}
diff --git a/src/app/(app)/[lang]/sport/sportpalya-tamogatas/page.tsx b/src/app/(app)/[lang]/sport/sportpalya-tamogatas/page.tsx
index 5ce2ec9..7628853 100644
--- a/src/app/(app)/[lang]/sport/sportpalya-tamogatas/page.tsx
+++ b/src/app/(app)/[lang]/sport/sportpalya-tamogatas/page.tsx
@@ -2,22 +2,28 @@ import { getDictionary } from '@/get-dictionary';
import type { Locale } from '@/i18n-config';
import GymSupportContent from './components/GymSupportContent';
import { PageHeader } from '@/components/common/PageHeader';
+import { parseFormattedText } from '@/utils/parseFormattedText';
+
type SportpalyaTamogatasPageProps = {
params: Promise<{ lang: Locale }>;
};
+
export default async function SportpalyaTamogatasPage({
params,
}: SportpalyaTamogatasPageProps) {
const { lang } = await params;
- const dictionary = await getDictionary(lang, 'sport');
+ const dictionary = await getDictionary(lang, 'sport');
+ const content = dictionary.sport.sportpalyaTamogatas;
+
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;