diff --git a/web/src/components/business/NodeSwitcher.tsx b/web/src/components/business/NodeSwitcher.tsx index 781993d..6a820eb 100644 --- a/web/src/components/business/NodeSwitcher.tsx +++ b/web/src/components/business/NodeSwitcher.tsx @@ -26,6 +26,9 @@ export function NodeSwitcher() { setSelected(activeInterconnectNodeId || 'local') }, []) + // SSR 时返回 null,避免 hydration 错误 + if (!mounted) return null + const fetchNodes = useCallback(async () => { try { const res = await getNodes()