diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index a0594cf..ea2f277 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -101,7 +101,7 @@ export function Sidebar() { style={{ color: "var(--text-muted)", background: "var(--row-hover)", border: "1px solid var(--surface-border)" }} > - {locale === "zh" ? "English" : "中文"} + {locale === "zh" ? "中文" : "English"} {/* Status */} diff --git a/components/TimeRangeSelector.tsx b/components/TimeRangeSelector.tsx index 0159a55..b3b8980 100644 --- a/components/TimeRangeSelector.tsx +++ b/components/TimeRangeSelector.tsx @@ -8,7 +8,7 @@ import { useTimeRange } from "@/lib/time-range-context"; import { useI18n } from "@/lib/i18n"; export function TimeRangeSelector() { - const { t } = useI18n(); + const { t, locale } = useI18n(); const { range, setRange, customStart, customEnd, setCustomStart, setCustomEnd } = useTimeRange(); const [showPopover, setShowPopover] = useState(false); const [localStart, setLocalStart] = useState(customStart); @@ -126,6 +126,7 @@ export function TimeRangeSelector() { setLocalStart(e.target.value)} className="input-glass w-full rounded-md px-3 py-1.5 text-xs font-[family-name:var(--font-geist-mono)]" @@ -137,6 +138,7 @@ export function TimeRangeSelector() { setLocalEnd(e.target.value)} className="input-glass w-full rounded-md px-3 py-1.5 text-xs font-[family-name:var(--font-geist-mono)]"