From 990d0c1bf0df89a80fc6c1e29f4642d9d5b0002e Mon Sep 17 00:00:00 2001 From: Ochieng Paul Date: Tue, 4 Feb 2025 14:55:42 +0300 Subject: [PATCH] updates --- website2/src/views/Forum/AboutPage.tsx | 114 +++++++++++++------------ 1 file changed, 61 insertions(+), 53 deletions(-) diff --git a/website2/src/views/Forum/AboutPage.tsx b/website2/src/views/Forum/AboutPage.tsx index d89323e096..af62adae1f 100644 --- a/website2/src/views/Forum/AboutPage.tsx +++ b/website2/src/views/Forum/AboutPage.tsx @@ -5,6 +5,21 @@ import { Divider, NoData } from '@/components/ui'; import { useForumData } from '@/context/ForumDataContext'; import { renderContent } from '@/utils/quillUtils'; +// Reusable component for a two-column row with a bold title on the left. +type SectionRowProps = { + title: string; + children: React.ReactNode; +}; + +const SectionRow: React.FC = ({ title, children }) => ( +
+
+ {title} +
+
{children}
+
+); + const AboutPage = () => { const data = useForumData(); @@ -12,19 +27,24 @@ const AboutPage = () => { return ; } - // Render the objectives list - const renderObjectives = () => ( -
-

- {data?.engagements?.title || 'Objectives'} -

-
- {data?.engagements?.objectives?.map((objective: any, index: number) => ( -

{objective.details || ''}

- ))} -
-
- ); + console.info(data); + + // Objectives Section: Render each objective as a SectionRow + const renderObjectives = () => { + const objectives = data?.engagement?.objectives || []; + return ( +
+

Objectives

+
+ {objectives.map((objective: any) => ( + + {objective.details} + + ))} +
+
+ ); + }; return (
@@ -32,55 +52,43 @@ const AboutPage = () => { {/* Main Content */}
- {/* Introduction */} -
+ {/* Introduction Section (kept out of the redesign) */} +
+

Introduction

+
+
{/* Objectives Section */} {renderObjectives()} - {/* Split Section - Sponsorship Opportunities */} -
-
-
-

- Sponsorship Opportunities -

-
-
-
-
+ {/* Sponsorship Opportunities Section */} + +
+ - {/* Split Section - Sponsorship Packages */} -
-
-
-

- Sponsorship Packages -

-
-
-
-
+ {/* Sponsorship Packages Section */} + +
+
);