From 812741e12517686e3b2e7c0c1f5177d7bca28c2f Mon Sep 17 00:00:00 2001 From: wenhwang97 Date: Tue, 14 May 2024 15:47:02 -0400 Subject: [PATCH 1/2] refine for mobile view --- src/pages/Post.tsx | 47 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/src/pages/Post.tsx b/src/pages/Post.tsx index be9a0ff..c6fa9d2 100644 --- a/src/pages/Post.tsx +++ b/src/pages/Post.tsx @@ -27,13 +27,13 @@ const Post: React.FC = () => { }, []); return ( -
+
-
    +
    1. { xmlns="http://www.w3.org/2000/svg" aria-hidden="true" > - +
    2. Article
-
-
-

+
+
+

{article?.attributes.title}

{/*

{article?.description}

*/} {/* place holder text */} -

- Explore our collection of informative mental health resources - designed to help teens navigate their emotional well-being and - find support. +

+ Explore our collection of informative mental health resources designed to help teens navigate their + emotional well-being and find support.

{/* {article?.attributes.author} */} -
+
- + { - + {
{article?.attributes.author ?? "CYCM Team"}
·
- {new Date( - article?.attributes.published_date - ).toLocaleDateString("en-US", { + {new Date(article?.attributes.published_date).toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric", @@ -137,7 +124,7 @@ const Post: React.FC = () => {
-
+
{/* random image as placeholder */} random {/* {article?.title} */} @@ -163,7 +150,7 @@ const Post: React.FC = () => { />
-
+
{article?.attributes.body_markdown}
From bcf6ac566ffb8a90b2a12498219e58c980787693 Mon Sep 17 00:00:00 2001 From: wenhwang97 Date: Tue, 14 May 2024 15:47:20 -0400 Subject: [PATCH 2/2] prettier fix --- src/pages/Post.tsx | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/pages/Post.tsx b/src/pages/Post.tsx index c6fa9d2..4ee025d 100644 --- a/src/pages/Post.tsx +++ b/src/pages/Post.tsx @@ -60,7 +60,11 @@ const Post: React.FC = () => { xmlns="http://www.w3.org/2000/svg" aria-hidden="true" > - +
  • { {/*

    {article?.description}

    */} {/* place holder text */}

    - Explore our collection of informative mental health resources designed to help teens navigate their - emotional well-being and find support. + Explore our collection of informative mental health resources + designed to help teens navigate their emotional well-being and + find support.

    {/* {article?.attributes.author} */}
    - + { - + {
    {article?.attributes.author ?? "CYCM Team"}
    ·
    - {new Date(article?.attributes.published_date).toLocaleDateString("en-US", { + {new Date( + article?.attributes.published_date + ).toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric",