Skip to content

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed Jun 25, 2024
1 parent 461d538 commit 3a0494f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 10 additions & 3 deletions web-app/src/components/sections/AppRight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useRouter } from "next/navigation";
import { selectConversation } from "@/store/slices/conversationSlice";
import ConversationHistory from "./History";
import NewChatButton from "./NewChatButton";
import Soon from "../site/indexes/Soon";

const AppRight = () => {
const { setRightSidebarOpen, rightSidebarOpen, rightTabKey, setRightTabKey } =
Expand Down Expand Up @@ -72,9 +73,15 @@ const AppRight = () => {
>
<Tabs activeKey={rightTabKey} onTabChange={handleRightTabChange}>
<TabPane enabled={true} tabKey={"history"} title={`History`}>
<div className={"scrollable-container pb-11"} style={{}}>
<ConversationHistory items={conversations} />
</div>
{conversations.length > 0 ? (
<div className={"scrollable-container pb-6"} style={{}}>
<ConversationHistory items={conversations} />
</div>
) : (
<div style={{ paddingTop: `8rem` }}>
<Soon section="chat_history"></Soon>
</div>
)}
</TabPane>
<></>
</Tabs>
Expand Down
7 changes: 5 additions & 2 deletions web-app/src/components/site/indexes/Soon/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Text from "@/components/base/Text";
import Freizeit from "@/fonts/loader";
import Header from "components/base/Header";
import Col from "components/layout/base/Grid/Col";
Expand All @@ -8,14 +9,15 @@ export interface SoonProps {
section?: string;
}
let text: String;

let subText: String;
const Soon: React.VFC<SoonProps> = ({ section }) => {
if (section === "access_control") {
text = `This section will allow you to control access to your index using access rules based on NFTs.`;
} else if (section === "ask") {
text = `This section will soon allow you to interact with your index through the LLM algorithms you choose.`;
} else if (section === "chat_history") {
text = `Your chat history will be here soon, with complete privacy.`;
text = `You don't have any chats yet.`;
subText = `Your chat history is stored securely with blockchain backed privacy.`;
}
return (
<>
Expand Down Expand Up @@ -57,6 +59,7 @@ const Soon: React.VFC<SoonProps> = ({ section }) => {
>
{text}
</Header>
{subText ? <div className=" mt-4 ">{subText}</div> : null}
</Col>
</Row>
</>
Expand Down

0 comments on commit 3a0494f

Please sign in to comment.