From 4f1181581e177dd80a76165a0f930ef4577f9c6a Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 22 Nov 2023 19:07:25 +0100
Subject: refactor(components): integrate sectioned page template into Page

* replace Section component by a generic one (other components should
be able to use it)
* add a PageSection component
* add `hasSections` prop to Page component
* remove sectioned-page template
---
 src/components/templates/page/page-comments.tsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'src/components/templates/page/page-comments.tsx')

diff --git a/src/components/templates/page/page-comments.tsx b/src/components/templates/page/page-comments.tsx
index bc715e8..170d6b7 100644
--- a/src/components/templates/page/page-comments.tsx
+++ b/src/components/templates/page/page-comments.tsx
@@ -8,7 +8,7 @@ import {
 import { useIntl } from 'react-intl';
 import { sendComment } from '../../../services/graphql';
 import type { SendCommentInput } from '../../../types';
-import { Heading, Link } from '../../atoms';
+import { Heading, Link, Section } from '../../atoms';
 import { Card, CardBody } from '../../molecules';
 import {
   type CommentData,
@@ -138,7 +138,7 @@ const PageCommentsWithRef: ForwardRefRenderFunction<
 
   return (
     <div {...props} className={wrapperClass} ref={ref}>
-      <section className={styles.section}>
+      <Section className={styles.comments__body}>
         <Heading className={styles.heading} level={2}>
           {commentsListTitle}
         </Heading>
@@ -154,10 +154,10 @@ const PageCommentsWithRef: ForwardRefRenderFunction<
             <CardBody>{noCommentsYet}</CardBody>
           </Card>
         )}
-      </section>
+      </Section>
       {areCommentsClosed ? null : (
-        <section
-          className={styles.section}
+        <Section
+          className={styles.comments__body}
           // eslint-disable-next-line react/jsx-no-literals
           id="comment-form-section"
         >
@@ -169,7 +169,7 @@ const PageCommentsWithRef: ForwardRefRenderFunction<
             className={styles.form}
             onSubmit={saveComment}
           />
-        </section>
+        </Section>
       )}
     </div>
   );
-- 
cgit v1.2.3

