Add home link and probability hub filters

This commit is contained in:
2569718930@qq.com
2026-04-22 03:25:40 +08:00
parent 1765f383e4
commit e59c106bbc
4 changed files with 379 additions and 26 deletions
@@ -10,6 +10,7 @@ import {
BookOpen,
Sparkles,
BarChart3,
House,
} from "lucide-react";
import { useDashboardStore } from "@/hooks/useDashboardStore";
import { useI18n } from "@/hooks/useI18n";
@@ -41,6 +42,8 @@ export function HeaderBar({
const isAuthenticated = store.proAccess.authenticated;
const docsHref = "/docs/intro";
const docsActive = pathname?.startsWith("/docs");
const homeHref = "/";
const homeActive = pathname === "/";
const probabilityHubHref = "/probabilities";
const probabilityHubActive = pathname?.startsWith("/probabilities");
const trialPromoLabel =
@@ -131,6 +134,16 @@ export function HeaderBar({
</button>
</div>
<Link
href={homeHref}
className={clsx("info-btn", homeActive && "active")}
title={t("header.homeAria")}
aria-label={t("header.homeAria")}
>
<House size={14} strokeWidth={2} />
{t("header.home")}
</Link>
<Link
href={docsHref}
className={clsx("info-btn", docsActive && "active")}