init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、 antdesign(管理后台)、landingpage(营销落地页)、 数据库 SQL 和配置文件。
This commit is contained in:
40
webapp/components/product/ContentSection.tsx
Normal file
40
webapp/components/product/ContentSection.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
"use client";
|
||||
|
||||
import TabNavigation from "./TabNavigation";
|
||||
import OverviewTab from "./OverviewTab";
|
||||
import { useApp } from "@/contexts/AppContext";
|
||||
import { ProductDetail } from "@/lib/api/fundmarket";
|
||||
|
||||
interface ContentSectionProps {
|
||||
product: ProductDetail;
|
||||
}
|
||||
|
||||
export default function ContentSection({ product }: ContentSectionProps) {
|
||||
const { t } = useApp();
|
||||
|
||||
const tabs = [
|
||||
{ id: "overview", label: t("tabs.overview") },
|
||||
{ id: "asset-description", label: t("tabs.assetDescription") },
|
||||
{ id: "performance-analysis", label: t("tabs.performanceAnalysis") },
|
||||
{ id: "asset-custody", label: t("tabs.assetCustody") },
|
||||
];
|
||||
|
||||
const handleTabChange = (tabId: string) => {
|
||||
if (tabId !== "overview") {
|
||||
setTimeout(() => {
|
||||
document.getElementById(tabId)?.scrollIntoView({ behavior: "smooth", block: "start" });
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-6 w-full">
|
||||
<TabNavigation
|
||||
tabs={tabs}
|
||||
defaultActiveId="overview"
|
||||
onTabChange={handleTabChange}
|
||||
/>
|
||||
<OverviewTab product={product} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user