rusackas opened a new pull request, #38533:
URL: https://github.com/apache/superset/pull/38533

   ### SUMMARY
   
   All 242 API doc pages were failing to build on Netlify with:
   
   ```
   TypeError: Cannot destructure property 'store' of 'i' as it is null.
       at MethodEndpoint
   ```
   
   **Root cause:** `docusaurus-theme-openapi-docs` v4.7.1 (resolved from 
`^4.6.0` in `package.json`) calls `useTypedSelector` (a Redux hook) at the top 
level of `MethodEndpoint`. During Docusaurus static site generation (SSG), no 
Redux `Provider` is available, so the store is `null` and destructuring crashes.
   
   **Fix:** Swizzle `MethodEndpoint` in `docs/src/theme/` to extract the Redux 
hook into a `ServerUrl` child component that only renders inside 
`<BrowserOnly>`, where the Redux store is available. The server URL display is 
browser-only behavior anyway — it was already rendered inside `<BrowserOnly>` 
in the original code.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — build fix only.
   
   ### TESTING INSTRUCTIONS
   
   - Netlify deploy preview on this PR should build successfully
   - All `/user-docs/api/...` pages should render
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to