@@ -4,29 +4,13 @@ import { useLocation } from '@docusaurus/router';
44import Layout from '@docusaurus/theme-classic/lib/theme/Layout/index' ;
55import useBaseUrl from '@docusaurus/useBaseUrl' ;
66import { usePluginData } from '@docusaurus/useGlobalData' ;
7- import React , { useEffect } from 'react' ;
7+ import React from 'react' ;
88
99export default function LayoutWrapper ( props ) {
1010 const { options : { subNavbar } } = usePluginData ( '@apify/docs-theme' ) ;
1111 const baseUrl = useBaseUrl ( '/' ) ;
1212 const currentPath = useLocation ( ) . pathname . replace ( new RegExp ( `^${ baseUrl } ` ) , '' ) ;
1313
14- // Silent cache busting for mcp.apify.com redirects
15- useEffect ( ( ) => {
16- // Only run on the MCP documentation page
17- if ( currentPath . includes ( 'integrations/mcp' ) ) {
18- // Always clear cache when on MCP page to help with redirect issues.
19- // Background: Previously, mcp.apify.com had a 301 redirect to this docs page, which was wrong.
20- // Many users have this redirect cached in their browsers, so they can't access the new MCP UI.
21- // This helps with their cached redirect, allowing them to access mcp.apify.com
22- fetch ( 'https://mcp.apify.com/' , { method : 'get' , cache : 'reload' } ) . then ( ( ) => {
23- console . log ( 'MCP cache cleared successfully' ) ;
24- } ) . catch ( ( error ) => {
25- console . warn ( 'Failed to clear MCP cache:' , error ) ;
26- } ) ;
27- }
28- } , [ currentPath ] ) ;
29-
3014 return (
3115 < >
3216 < Head >
0 commit comments