Skip to content

Commit ffff126

Browse files
updates
1 parent b01336f commit ffff126

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

website2/src/app/clean-air-forum/sponsorships/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ const SponsorshipPage = () => {
5454
{/* Additional Section Data for Sponsorship Page */}
5555
{sponsorshipSections && sponsorshipSections.length > 0 && (
5656
<>
57-
<Divider className="bg-black p-0 m-0 h-[1px] w-full" />
5857
{sponsorshipSections.map((section: any) => (
5958
<SectionDisplay key={section.id} section={section} />
6059
))}

website2/src/views/Forum/SectionDisplay.tsx

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import DOMPurify from 'dompurify';
33
import React from 'react';
44

5+
import Divider from '@/components/ui/Divider';
56
import { renderContent } from '@/utils/quillUtils';
67

78
export interface SectionData {
@@ -35,23 +36,26 @@ const SectionDisplay: React.FC<{ section: SectionData }> = ({ section }) => {
3536

3637
if (section.section_type === 'split') {
3738
return (
38-
<div className="flex flex-col md:flex-row gap-4 my-8">
39-
{/*
40-
For split sections, we use conditional order classes.
41-
- If reverse_order is false: title is first (left) and content second (right).
42-
- If reverse_order is true: content is first (left) and title second (right).
43-
*/}
44-
<div
45-
className={`w-full md:w-1/2 ${section.reverse_order ? 'order-2' : 'order-1'}`}
46-
>
47-
<h2 className="text-2xl font-bold">{section.title}</h2>
48-
</div>
49-
<div
50-
className={`w-full md:w-1/2 ${section.reverse_order ? 'order-1' : 'order-2'}`}
51-
>
52-
<div dangerouslySetInnerHTML={{ __html: contentHTML }} />
39+
<>
40+
<Divider className="bg-black p-0 m-0 h-[1px] w-full" />
41+
<div className="flex flex-col md:flex-row gap-4 my-8">
42+
{/*
43+
For split sections, we use conditional order classes.
44+
- If reverse_order is false: title is first (left) and content second (right).
45+
- If reverse_order is true: content is first (left) and title second (right).
46+
*/}
47+
<div
48+
className={`w-full md:w-1/3 ${section.reverse_order ? 'order-2' : 'order-1'}`}
49+
>
50+
<h2 className="text-xl font-bold">{section.title}</h2>
51+
</div>
52+
<div
53+
className={`w-full md:w-2/3 text-left space-y-4 ${section.reverse_order ? 'order-1' : 'order-2'}`}
54+
>
55+
<div dangerouslySetInnerHTML={{ __html: contentHTML }} />
56+
</div>
5357
</div>
54-
</div>
58+
</>
5559
);
5660
} else {
5761
// For "column" type, render the title above the content with a small gap.

0 commit comments

Comments
 (0)