aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates/page/page-comments.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-22 19:07:25 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-23 11:44:28 +0100
commit4f1181581e177dd80a76165a0f930ef4577f9c6a (patch)
tree6029f86d42af7700f5b59cd1477854190bab65c6 /src/components/templates/page/page-comments.tsx
parent329e7c89bac50be9db2c6d2ec6751ab0ffad42ac (diff)
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
Diffstat (limited to 'src/components/templates/page/page-comments.tsx')
-rw-r--r--src/components/templates/page/page-comments.tsx12
1 files changed, 6 insertions, 6 deletions
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>
);