@@ -3,7 +3,7 @@ import { useNavigate } from "react-router";
33import { useAllPollTaskList } from "@/api/conversation" ;
44import { agentSuggestions } from "@/mock/agent-data" ;
55import ChatInputArea from "../agent/components/chat-conversation/chat-input-area" ;
6- import { AgentSuggestionItem , AgentTaskCards } from "./components" ;
6+ import { AgentSuggestionsList , AgentTaskCards } from "./components" ;
77import TradingViewTickerTape from "./components/tradingview-ticker-tape" ;
88
99const INDEX_SYMBOLS = [
@@ -21,29 +21,22 @@ function Home() {
2121 const [ inputValue , setInputValue ] = useState < string > ( "" ) ;
2222
2323 const { data : allPollTaskList } = useAllPollTaskList ( ) ;
24- const hasNewsTickerTape = allPollTaskList ?. some (
25- ( item ) => item . agent_name === "NewsAgent" ,
26- ) ;
2724
2825 const handleAgentClick = ( agentId : string ) => {
2926 navigate ( `/agent/${ agentId } ` ) ;
3027 } ;
3128
3229 return (
33- < div className = "scroll-container flex min-h-svh min-w-[800px] flex-col gap-3 pb-4 " >
30+ < div className = "flex h-full min-w-[800px] flex-col gap-3" >
3431 { allPollTaskList && allPollTaskList . length > 0 ? (
35- < section className = "flex h-full flex-1 flex-col items-center justify-between gap-4 overflow-hidden" >
36- { hasNewsTickerTape && (
37- < div className = "mx-auto w-4/5 max-w-[800px] px-4" >
38- < TradingViewTickerTape symbols = { INDEX_SYMBOLS } />
39- </ div >
40- ) }
41- < div className = "scroll-container w-full" >
32+ < section className = "flex w-full flex-1 flex-col items-center justify-between gap-4" >
33+ < TradingViewTickerTape symbols = { INDEX_SYMBOLS } />
34+
35+ < div className = "scroll-container flex-1" >
4236 < AgentTaskCards tasks = { allPollTaskList } />
4337 </ div >
4438
4539 < ChatInputArea
46- className = "w-full"
4740 value = { inputValue }
4841 onChange = { ( value ) => setInputValue ( value ) }
4942 onSend = { ( ) =>
@@ -56,20 +49,15 @@ function Home() {
5649 />
5750 </ section >
5851 ) : (
59- < section className = "flex h-full w-full flex-1 flex-col items-center gap-8 overflow-hidden rounded-lg bg-white pt-12" >
60- < div className = "mx-auto w-4/5 max-w-[800px] px-4" >
61- < TradingViewTickerTape symbols = { INDEX_SYMBOLS } />
62- </ div >
63- < div className = "mt-16 space-y-4 text-center text-gray-950" >
64- < h1 className = "font-medium text-3xl" > 👋 Hello Investor!</ h1 >
65- </ div >
52+ < section className = "flex w-full flex-1 flex-col items-center gap-8 rounded-lg bg-white px-6 pt-12" >
53+ < TradingViewTickerTape symbols = { INDEX_SYMBOLS } />
6654
67- < div className = "flex w-full max-w-[800px] flex-col gap-4 px-4 " >
68- { /* Index section redesigned to ticker tape */ }
69- </ div >
55+ < h1 className = "mt-16 font-medium text-3xl text-gray-950 " >
56+ 👋 Hello Investor!
57+ </ h1 >
7058
7159 < ChatInputArea
72- className = "w-3/4 max-w-[800px]"
60+ className = "w-4/5 max-w-[800px]"
7361 value = { inputValue }
7462 onChange = { ( value ) => setInputValue ( value ) }
7563 onSend = { ( ) =>
@@ -81,17 +69,12 @@ function Home() {
8169 }
8270 />
8371
84- < div className = "grid w-full max-w-[800px] grid-cols-3 gap-4 px-4" >
85- { agentSuggestions . map ( ( suggestion ) => (
86- < AgentSuggestionItem
87- key = { suggestion . id }
88- suggestion = { {
89- ...suggestion ,
90- onClick : ( ) => handleAgentClick ( suggestion . id ) ,
91- } }
92- />
93- ) ) }
94- </ div >
72+ < AgentSuggestionsList
73+ suggestions = { agentSuggestions . map ( ( suggestion ) => ( {
74+ ...suggestion ,
75+ onClick : ( ) => handleAgentClick ( suggestion . id ) ,
76+ } ) ) }
77+ />
9578 </ section >
9679 ) }
9780 </ div >
0 commit comments