|
2 | 2 | import DOMPurify from 'dompurify';
|
3 | 3 | import React from 'react';
|
4 | 4 |
|
| 5 | +import Divider from '@/components/ui/Divider'; |
5 | 6 | import { renderContent } from '@/utils/quillUtils';
|
6 | 7 |
|
7 | 8 | export interface SectionData {
|
@@ -35,23 +36,26 @@ const SectionDisplay: React.FC<{ section: SectionData }> = ({ section }) => {
|
35 | 36 |
|
36 | 37 | if (section.section_type === 'split') {
|
37 | 38 | 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> |
53 | 57 | </div>
|
54 |
| - </div> |
| 58 | + </> |
55 | 59 | );
|
56 | 60 | } else {
|
57 | 61 | // For "column" type, render the title above the content with a small gap.
|
|
0 commit comments