-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathroute.tsx
More file actions
79 lines (71 loc) · 2.42 KB
/
route.tsx
File metadata and controls
79 lines (71 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import { Plus } from "lucide-react";
import {
AgentRecommendList,
AgentSuggestionsList,
SparklineStockList,
} from "@/app/_home/components";
import { Button } from "@/components/ui/button";
import {
StockMenu,
StockMenuContent,
StockMenuGroup,
StockMenuGroupHeader,
StockMenuHeader,
StockMenuListItem,
} from "@/components/valuecell/menus/stock-menus";
import { agentRecommendations, agentSuggestions } from "@/mock/agent-data";
import { sparklineStockData, stockData } from "@/mock/stock-data";
function Home() {
const handleAgentClick = (agentId: string, title: string) => {
console.log(`Agent clicked: ${title} (${agentId})`);
};
return (
<div className="flex size-full overflow-hidden">
<main className="flex flex-1 flex-col gap-6 overflow-hidden p-8">
<h1 className="font-medium text-3xl">👋 Welcome to ValueCell !</h1>
<SparklineStockList stocks={sparklineStockData} />
<AgentSuggestionsList
title="What can I help you?"
suggestions={agentSuggestions.map((suggestion) => ({
...suggestion,
onClick: () => handleAgentClick(suggestion.id, suggestion.title),
}))}
/>
<AgentRecommendList
title="Recommended Agents"
recommendations={agentRecommendations.map((recommendation) => ({
...recommendation,
onClick: () =>
handleAgentClick(recommendation.id, recommendation.title),
}))}
/>
</main>
<aside className="flex h-full flex-col justify-between border-l">
<StockMenu>
<StockMenuHeader>My Stocks</StockMenuHeader>
<StockMenuContent>
{stockData.map((group) => (
<StockMenuGroup key={group.title}>
<StockMenuGroupHeader>{group.title}</StockMenuGroupHeader>
{group.stocks.map((stock) => (
<StockMenuListItem
key={stock.symbol}
stock={stock}
onClick={() => {
console.log("Selected stock:", stock.symbol);
}}
/>
))}
</StockMenuGroup>
))}
</StockMenuContent>
</StockMenu>
<Button variant="secondary" className="mx-5 mb-6 font-bold text-sm">
<Plus size={16} />
Add Stocks
</Button>
</aside>
</div>
);
}
export default Home;