From 75eec5c6b21e4a50db302228b0fa9c98a3010c9b Mon Sep 17 00:00:00 2001 From: Valik Date: Sat, 10 Feb 2024 22:07:43 +0100 Subject: [PATCH] refactor: update styles and refactor Reviews component --- src/components/Reviews.jsx | 44 ++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/components/Reviews.jsx b/src/components/Reviews.jsx index 528c255..c7ce9be 100644 --- a/src/components/Reviews.jsx +++ b/src/components/Reviews.jsx @@ -37,31 +37,29 @@ const Reviews = () => { return ( <> {!isLoading && data.length === 0 && } -
+
    {data.map(review => ( -
      -
    • - - - {review.author} - - {format(new Date(review.created_at), 'HH:mm, MMMM d, yyyy')} - - - - {/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/.test( - review.content - ) ? ( -

      {parse(review.content)}

      - ) : ( - {review.content} - )} -
      -
      -
    • -
    +
  • + + + {review.author} + + {format(new Date(review.created_at), 'HH:mm, MMMM d, yyyy')} + + + + {/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/.test( + review.content + ) ? ( +

    {parse(review.content)}

    + ) : ( + {review.content} + )} +
    +
    +
  • ))} -
+ ); };