From b52b8183ce299b5a2d3c3b2f4f8cb94bb443d746 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Mon, 2 Oct 2023 18:07:34 +0200
Subject: refactor(components): rewrite Notice component

* Rename message prop to children prop and set ReactNode as type
---
 src/components/templates/page/page-layout.tsx | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

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

diff --git a/src/components/templates/page/page-layout.tsx b/src/components/templates/page/page-layout.tsx
index dfd9353..ee3fd3a 100644
--- a/src/components/templates/page/page-layout.tsx
+++ b/src/components/templates/page/page-layout.tsx
@@ -281,11 +281,9 @@ export const PageLayout: FC<PageLayoutProps> = ({
                 depth={2}
                 Notice={
                   commentStatus?.isReply ? (
-                    <Notice
-                      className={styles.notice}
-                      kind={commentStatus.kind}
-                      message={commentStatus.message}
-                    />
+                    <Notice className={styles.notice} kind={commentStatus.kind}>
+                      {commentStatus.message}
+                    </Notice>
                   ) : null
                 }
                 saveComment={saveComment}
@@ -307,11 +305,9 @@ export const PageLayout: FC<PageLayoutProps> = ({
               title={commentFormTitle}
               Notice={
                 commentStatus && !commentStatus.isReply ? (
-                  <Notice
-                    className={styles.notice}
-                    kind={commentStatus.kind}
-                    message={commentStatus.message}
-                  />
+                  <Notice className={styles.notice} kind={commentStatus.kind}>
+                    {commentStatus.message}
+                  </Notice>
                 ) : null
               }
             />
-- 
cgit v1.2.3

