From 10b38e392aac680dabb4c28cb8b5ae6be9702458 Mon Sep 17 00:00:00 2001 From: Yifei Hu Date: Wed, 10 Jul 2024 12:59:34 +0800 Subject: [PATCH] fix the color of dark mode --- ui/components/ContextItem.tsx | 8 ++++---- ui/components/NewsDetail.tsx | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ui/components/ContextItem.tsx b/ui/components/ContextItem.tsx index 59e77be..55d622a 100644 --- a/ui/components/ContextItem.tsx +++ b/ui/components/ContextItem.tsx @@ -17,8 +17,8 @@ interface ContextItemProps { const ContextItem: React.FC = ({ item }) => { return ( -
-

{item.name}

+
+

{item.name}

{item.image && ( = ({ item }) => { className="my-2 rounded" /> )} -

{item.description}

-
+

{item.description}

+
{item.provider[0].name} | {new Date(item.datePublished).toLocaleDateString()}
diff --git a/ui/components/NewsDetail.tsx b/ui/components/NewsDetail.tsx index f296df2..96c425d 100644 --- a/ui/components/NewsDetail.tsx +++ b/ui/components/NewsDetail.tsx @@ -39,14 +39,14 @@ interface NewsDetailProps { const NewsDetail: React.FC = ({ news }) => { return ( -
-

{news.title}

+
+

{news.title}

{news.sections.map((section, index) => (
-

{section.title}

-

{section.content}

+

{section.title}

+

{section.content}

-

Related Context:

+

Related Context:

{section.context.map((item, i) => ( ))}