From 1cd69fab804547d50078fa3563fa1e8b234ea0d0 Mon Sep 17 00:00:00 2001 From: serhat Date: Tue, 21 May 2024 14:29:07 +0300 Subject: [PATCH] fix --- .../TabContainer/ChatTab.tsx | 33 +++++++++---------- .../index-details/IndexIndexItem/index.tsx | 2 +- .../site/index-details/LinkItem/index.tsx | 4 ++- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/web-app/src/components/sections/IndexConversation/TabContainer/ChatTab.tsx b/web-app/src/components/sections/IndexConversation/TabContainer/ChatTab.tsx index 4aed1306..9ff14aa0 100644 --- a/web-app/src/components/sections/IndexConversation/TabContainer/ChatTab.tsx +++ b/web-app/src/components/sections/IndexConversation/TabContainer/ChatTab.tsx @@ -1,28 +1,27 @@ import NoIndexesChat from "@/components/ai/no-indexes"; import AskIndexes from "@/components/site/indexes/AskIndexes"; import { useApp } from "@/context/AppContext"; -import LoadingSection from "../../Loading"; import { useIndexConversation } from "../IndexConversationContext"; export default function ChatTabSection() { const { viewedIndex, viewedProfile, chatID } = useApp(); - const { itemsState, loading: indexLoading } = useIndexConversation(); + const { itemsState } = useIndexConversation(); - if (indexLoading) { - return ( -
- -
- ); - } + // if (indexLoading) { + // return ( + //
+ // + //
+ // ); + // } if (itemsState.items.length > 0 && viewedIndex) { return chatID ? ( diff --git a/web-app/src/components/site/index-details/IndexIndexItem/index.tsx b/web-app/src/components/site/index-details/IndexIndexItem/index.tsx index 26db63b1..4617f9ae 100644 --- a/web-app/src/components/site/index-details/IndexIndexItem/index.tsx +++ b/web-app/src/components/site/index-details/IndexIndexItem/index.tsx @@ -97,7 +97,7 @@ const IndexIndexItem: React.FC = ({ - + {node?.updatedAt ? `Updated ${moment(new Date(node.updatedAt)).fromNow()}` : ""} diff --git a/web-app/src/components/site/index-details/LinkItem/index.tsx b/web-app/src/components/site/index-details/LinkItem/index.tsx index a853075d..1547671e 100644 --- a/web-app/src/components/site/index-details/LinkItem/index.tsx +++ b/web-app/src/components/site/index-details/LinkItem/index.tsx @@ -96,7 +96,9 @@ const LinkItem: React.FC = ({ /> {node?.url?.substring(0, 80)} •{" "} - {node?.updatedAt ? moment(node?.updatedAt).format("MMM D") : ""} + {node?.updatedAt + ? `Updated ${moment(new Date(node.updatedAt)).fromNow()}` + : ""}