fix: fetch settings on home page mount so tools are visible

The old home page called fetchSettings() on mount. The rewrite
dropped that call, so the settings store never loaded and
visibleTools was always empty (0 tools shown).
This commit is contained in:
SnapOtter
2026-06-14 20:34:59 +08:00
parent f68fcb8ca6
commit cf543f6976
+6 -1
View File
@@ -51,11 +51,16 @@ export function HomePage() {
const { t } = useTranslation(); const { t } = useTranslation();
const [activeTab, setActiveTab] = useState<string>("all"); const [activeTab, setActiveTab] = useState<string>("all");
const [search, setSearch] = useState(""); const [search, setSearch] = useState("");
const { disabledTools, experimentalEnabled, loaded } = useSettingsStore(); const { fetch: fetchSettings, disabledTools, experimentalEnabled, loaded } =
useSettingsStore();
const recentToolIds = useRecentTools(); const recentToolIds = useRecentTools();
usePageTitle(); usePageTitle();
useEffect(() => {
fetchSettings();
}, [fetchSettings]);
// ── Tab definitions ────────────────────────────────────────── // ── Tab definitions ──────────────────────────────────────────
const tabs: TabDef[] = useMemo( const tabs: TabDef[] = useMemo(