feat/ui-0.22:set static NEXT_PUBLIC_MCP_URL
This commit is contained in:
1 parent
f108551780
commit
d91c1c5369
3 files changed
+2
-6
No files matched your search
@@ -21,7 +21,7 @@ export const ServerConfig: React.FC<ServerConfigProps> = ({ product, mcpName })
|
||||
const [url, setUrl] = useState<string>(process.env.NEXT_PUBLIC_MCP_URL || "");
|
||||
useEffect(() => {
|
||||
if (url || !product.slug_name) return
|
||||
setUrl(`${window.location.origin}/mcp/${product.slug_name}`);
|
||||
setUrl(`${window.location.protocol}//${window.location.hostname}:8002/mcp/${product.slug_name}`);
|
||||
}, [product.slug_name]);
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user