From a5cad47c781cdceb623bbcd5deea2cffb20fcbfe Mon Sep 17 00:00:00 2001 From: developomp Date: Tue, 17 Aug 2021 09:05:45 +0900 Subject: [PATCH] removed "Published on" --- source/src/components/PostCard.tsx | 2 +- source/src/pages/Page.tsx | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/source/src/components/PostCard.tsx b/source/src/components/PostCard.tsx index b3458ce..be55f5f 100644 --- a/source/src/components/PostCard.tsx +++ b/source/src/components/PostCard.tsx @@ -100,7 +100,7 @@ export default class PostCard extends React.Component { <> )} - Published on{" "} + {" "} {this.props.postData?.date || "Unknown date"}      {" "} diff --git a/source/src/pages/Page.tsx b/source/src/pages/Page.tsx index 1b1f855..3cff096 100644 --- a/source/src/pages/Page.tsx +++ b/source/src/pages/Page.tsx @@ -318,13 +318,20 @@ export default class Page extends React.Component { {!this.state.isUnsearchable && ( {" "} - Published on {this.state.fetchedPage.date} + {this.state.fetchedPage?.date || + "Unknown date"}      {" "} - {this.state.fetchedPage.readTime} read + {this.state.fetchedPage?.readTime + ? this.state.fetchedPage?.readTime + + " read" + : "unknown length"}      {" "} - {this.state.fetchedPage.wordCount} words + {this.state.fetchedPage?.wordCount + ? this.state.fetchedPage.wordCount + + " words" + : "unknown words"} )}